Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

2 Answers 2

Maybe this is related - A bug report: Bug 183458 - Numpad (keypad) keys not mapped correctly when setting Global Shortcuts / https://bugs.kde.org/show_bug.cgi?id=183458

share|improve this answer
up vote 2 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

Your Answer

 
discard

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.