A Nonpareil user asked about keyboard mapping for the 41C/CV/CX ON, USER, PRGM, ALPHA, shift (gold), SST, and R/S keys. All keyboard mappings are user-configurable in the KML file, but setting them properly is tricky. Until now, you had to know GDK’s host keyboard keysym number (called “scancode” in the KML file), and the number had to be present in the scancode statement twice. For example:
scancode 105 map 105 24 end # i
maps GDK keysym 105 (the “i” key) to logical key 24 (row 2, column 4).
To make this less tricky and error-prone, I’ve made two changes:
- The first argument of the map command can be a zero when used in a scancode statement.
- The keysym can be specified by name usinng a quoted string.
The updated KML reads:
scancode "i" map 0 24 end
The GDK keysym names are case-sensitive, and they aren’t always obvious if you’re trying to guess what they might be, but they can be found in the file gdkkeysyms.h. The leading “GDK_” of the define should not be included in the string in the KML file.