The arrow keys on the numeric keypad do not work with Java applications on Linux. Strangely enough, the Home, End, PgUp, PgDn, Ins, Del all work.
This is especially annoying when using Intellij for programming.
How do you get the arrow keys working?
When I use the "Find Actions by shortcut" box, the dedicated arrow keys and the numeric keypad arrow keys (num lock off) produce the same code. The both say Up, Down, Left or Right so I can't distinguish between those two sets of keys. They should produce the same result but when I'm in the editor, they don't.
The arrow keys in the main part of the keyboard are small and inconvenient to use. I would like to use the arrows keys that are part of the numeric key pad. The keys on the numeric keypad normally produce numbers of course but if I hit num lock so num lock is off they become arrow keys.
While the num lock function does not do anything for the standard arrow keys, it could be the reason behind your keypad arrow keys not functioning as needed.
I want to emulate the way the numeric keypad keys behave in Windows, i.e. basically NOT to type numbers, but to navigate the caret ("keyboard cursor") on screen, including, crucially, the ability to go shift+numeric_number = "extend selection". Your experience will differ no doubt if your OS is different and you want to achieve something different.
IntelliJ (and CLion) provides the functionality to configure key mappings. Under File->Settings->Keymap->Editor actions
it is possible to assign both of the keystrokes ("normal" up/down/left/right and the keypad ones) to corresponding actions. Once this is done, all works like a charm. No need to fiddle with xkb or something.
Physical keys on a keyboard are mapped to key codes using xkb. Here's how I got numeric keys working with java applications (like Intellij) on a Debian derivative of Linux:
Now the numeric keypad will emit the regular, arrow, key codes and not the java-unrecognised, numeric keypad, arrow, key codes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With