WinKey assignments in the layout file

45 views
Skip to first unread message

MickM

unread,
Oct 3, 2023, 8:08:08 AM10/3/23
to Free42 & Plus42
I'm trying to add GtkKey and WinKey lines to my skin's layout file. I only have a Mac but don't have a Linux or Windows setup to do any of the testing. So that's my excuse for the forum's official Stupid Question of the Day. For a Mac I see the intuitive declarations for key mappings associated with "a" and "A" (or ⇧a):

MacKey: a : 50
MacKey: A : 51
MacKey: CShift a : 51

and the Gtk definitions nicely correspond:

GtkKey: a : 50
GtkKey: A : 51
GtkKey: CShift a : 51

but I'm confused about Windows, which appears to use ASCII codes. The ASCII code for "a" is 97 and for "A" it's 65. Here's the WinKey lines I see corresponding to the above:

WinKey: 65 : 50
WinKey: Shift 65 : 51
WinKey: CShift 65 : 51

Why is the line for "a" using the ASCII code for "A", and likewise the line for "A" using using the ⇧A instead of ⇧a? I'm wondering if a mistake was perhaps made, and if not what this implies when I try to define WinKey mappings for e.g. "5" and "%" (i.e. ⇧5). 

MickM

unread,
Oct 3, 2023, 8:26:47 AM10/3/23
to Free42 & Plus42
Hmm - a possibility just occurred to me when I looked at my (Mac) keyboard. The characters appearing on the keyboard buttons for the alphabetic letters are in uppercase. Maybe the Windows key codes are referring to what's printed on the keyboard keys instead of what you get when you use that key. So the standard keyboard is not WYSIWYG! After staring at these things for my entire life that fact just dawned on me!...

Thomas Okken

unread,
Oct 3, 2023, 12:40:11 PM10/3/23
to Free42 & Plus42
The Windows version uses Windows Virtual-Key Codes:
Reply all
Reply to author
Forward
0 new messages