Keyboard firmware mapping

I’ve just successfully remaped my reform keyboard for the first time. It’s a great relief to finally have ctrl next to the A key where it belongs! However, I noticed a strange quirk I can’t understand.

It seems that no matter what keycode I put in the key next to left shift, it sends a forward-delete keycode (119). Oddly in the default firmware it’s mapped to HID_KEYBOARD_SC_NON_US_BACKSLASH_AND_PIPE rather than delete.

Here’s the matrix in my version: *temp*

The indicated key can be bound to any value, but it always produces a forward-delete keycode. xev shows this:

KeyPress event, serial 34, synthetic NO, window 0x2800001,
root 0xd0, subw 0x0, time 3252890, (515,416), root:(515,416),
state 0x0, keycode 119 (keysym 0xffff, Delete), same_screen YES,
XLookupString gives 1 bytes: (7f) “”
XmbLookupString gives 1 bytes: (7f) “”
XFilterEvent returns: False

Any idea what’s going on here?

1 Like

Yes, you simply have to comment out the KBD_VARIANT_QWERTY_US define near the top of Keyboard.c for this key not to be overwritten later in the code.

I see, thanks for pointing that out. So you’re saying it’s intentional?

It looks like the only purpose of that whole define is to override whatever value was in the original matrix array, but its naming doesn’t reflect that, since QWERTY_US layouts don’t have a delete key in that position. I feel like that should probably be removed? Or at least renamed to make its purpose clearer, though it’s difficult for me to determine what the purpose is.

I can submit a patch to fix this if you like.