Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to map keys in KWin like Meta + KP4 in Kubuntu 11.04.

If numlock is on, it gets recorded as "Meta + 4" and then works with the 4 on the main keyboard, but NOT on the keypad.

If numlock is off, it gets recorded as "Meta + Left" and then works with the left arrow on the main keyboard, but NOT on the keypad.

I want it to work on the keypad! Maybe there is some option in the keyboard settings...?

share|improve this question
up vote 5 down vote accepted

Thanks for the lead, there was a suggestion of a workaround in it. Here it is in case anyone else runs into this:

Create ~/.Xmodmap with the following text:

keycode 87 = XF86Launch1
keycode 88 = XF86Launch2
keycode 89 = XF86Launch3
keycode 83 = XF86Launch4
keycode 84 = XF86Launch5
keycode 85 = XF86Launch6
keycode 79 = XF86Launch7
keycode 80 = XF86Launch8
keycode 81 = XF86Launch9
keycode 90 = XF86LaunchA
keycode 91 = XF86LaunchB

I also added

keycode 86 = XF86LaunchC
keycode 82 = XF86LaunchD

which is for keypad +/-.

Then run xmodmap ~/.Xmodmap. You should be able to bind the to the keys now. Also, if other keys aren't working try the utility xev, which can tell you what the keycode is for a specific key and add it in a similar way.

share|improve this answer
This works, and I added it to run automatically on startup. Btw, I want to say neither the numbers of the numpad nor the key arrows (Bloq Num on/off) don't work at all. – Gerard Aug 19 '15 at 19:12

Maybe this is related - A bug report: Bug 183458 - Numpad (keypad) keys not mapped correctly when setting Global Shortcuts /

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.