Mapping keyboard codes (xev output) to butterfly names

I’ve just flashed my model01, a really well polished experience considering we’re modifying hardware. Many thanks to the months of labour crafting this.

I have found how to modify the key definitions in general, but I want to map a bunch of things I use extensively elsewhere. The example is specific but I’d like to know where I can research the general case.

e.g. in i3 window manager, I use the right command key to control i3. This is reported by xev -event keyboard as keycode 116:

KeyPress event, serial 28, synthetic NO, window 0x3200001,
root 0x1e6, subw 0x0, time 9648086, (547,679), root:(2258,705),
state 0x10, keycode 116 (keysym 0xffec, Super_R), same_screen YES,
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x3200001,
root 0x1e6, subw 0x0, time 9648158, (547,679), root:(2258,705),
state 0x50, keycode 116 (keysym 0xffec, Super_R), same_screen YES,
XLookupString gives 0 bytes: 
XFilterEvent returns: False

for example.

I’ve looked in keyboardio/avr/libraries/Kaleidoscope/src/kaleidoscope/key_defs_* and don’t find any mappings that relate that way.

After some trial and error, I land on Key_RightGui for this, but surely there is a more efficient way than guessing?

1 Like