FLTK logo

Re: [fltk.coredev] Key-combination for zoom (forked from fltk-general Sys-Menu-Bar thread)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Key-combination for zoom (forked from fltk-general Sys-Menu-Bar thread) "'Albrecht Schlosser' via fltk.coredev" 08:51 Mar 06  
  On 3/5/24 21:50 Albrecht Schlosser wrote:
... for non-letter keys like '+', '-', '=' I couldn't find a usable
value. It looks like CTRL / X where X is a key on the default (US)
keyboard layout. This doesn't really help. There are more functions I
didn't explore (yet?) to map virtual keycodes to a specific key
dependent on the "keyboard layout". This *might* help if this would give
us the information that (a) the CTRL key and (b) the '=' key was
pressed. The latter maybe derived from the scan code and the current
keyboard layout...

If anybody could help by contributing code how to map a CTRL/K combo
with 'K' not being an alphabetical key, then I'd appreciate this very much!

I'm still looking for a clean and system conformant way to get the correct key information. Any help would be appreciated.

However, I made progress: I found the culprit of the inconsistent key codes on Windows!

The problem is that we don't get the key codes from Windows. We are using a "hand-made" translation table in our code instead, and this table is based in large parts on Windows' "virtual key codes" (for all function keys, letter keys, etc.) which is good but there is another much smaller part (11 non-letter key codes) that translates key codes to key symbols like '+', '-', ';', etc. - and this part of the table uses the US/UK keyboard layout unconditionally! This is the reason why (some) ctrl/X combos (for X = non-letter keys) worked, mainly on US/UK keyboards but not on other keyboards.

I'm trying to find a better solution but so far I don't know if I can find a solution independent of hard-coded keyboard layout information. That would be my goal. Although I'm much more confident now. There *should* be a way to get the key information from the OS...

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/40b76cce-6465-4bbc-ace9-a9443a2389b3%40aljus.de.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.