I picked up a external Logitech numpad recently and figured it might be useful to use it for macros.

However, since it's a numpad, every time I will press the button to set off the macro, that number will show up in whatever I'm typing, thus forcing me to backspace.

Is there a way that I can make the input from this numpad be redirected so that only one window actually receives the keystroke?

  • It might be possible to map the numpad keys to something else that doesn't print a character (like esc, f1, ctrl, etc) using xmodmap – Davide Jul 14 '15 at 15:48
  • @Davide Perhaps, but the problem is that the numpad is outputting the same keycode as the numpad on my keyboard does - thus I'd be totally remapping the numpad keycodes, not the external numpad :( – RPiAwesomeness Jul 14 '15 at 16:03
  • I guess as a quick, temporary, fix you could turn off numlock – Davide Jul 14 '15 at 16:12
  • You can use the evrouter utility. Its config file can have lines like that: "Logitech Gaming Mouse G300" "/dev/input/event.*" any key/275 "SHELL/xte 'key e'". Which means: when key/275 is pressed on my G300 mouse, it is transformed into 'e' keypress. (keyboards and mice are treated the same; you can notice that it is actually the shell script that does the 'e' keypress, so it can be anything) – Velkan Jul 14 '15 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.