|
|
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 ] | |
|
| |