1.16 handles numpad differently compared to 1.15?



Could anyone point me to what changed regarding keyboard shortcut handling from 1.15 to 1.16?

I have a pretty wacky keyboard setup. In short, I’ve changed the physical Numpad7 key to print { instead of 7. As a user of vim-mode-plus, I have a { keyboard shortcut. That one doesn’t trigger anymore after I updated from 1.15 to 1.16. Here’s what the keybinding resolver says:

1.15: {
1.16: numpad7

In a browser, event.key === "{" and event.code === "Numpad7". Which is correct.

It sure looks like Atom has switched from using event.key to event.code. For me though, I’d prefer Atom to always honor the current keyboard layout and ignore the physical keys (scan codes).

Could anyone point me to an issue or commit or something about this, so I can figure out what’s going on? I don’t want to be this guy: https://xkcd.com/1172/

In order to avoid a potential XY problem, here is some more information regarding my keyboard:

It is a Truly Ergonomic Keyboard. They allow some customization of the keyboard firmware. What you can do is basically move the standard keys of a standard keyboard around. But I want common programming characters such as {, }, (, ), [ and ] to be on the home row (while holding a special layer key). I’ve done this by moving keys I don’t use, such as the numpad keys, into this special layer. Then I’ve made a custom keyboard layout in my operating system that remaps Numpad7 to { and so on. If you’re interested, you can find out more here: https://github.com/lydell/keyboard


Actually, I just noticed that all my crazy keyboard rebindings work just fine – except the numpad keys. So I suspect that 1.16 treat just the numpad keys differently.


@leedohm helped me find the cause on Slack: https://github.com/atom/atom-keymap/pull/198

I will now try to copy all vim-mode-plus shortcuts for the characters that I’ve put on numpad keys…