Monday, May 6, 2024
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 2074  / 2 Years ago, sun, april 17, 2022, 4:30:46

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...?


More From » shortcut-keys

 Answers
7

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.


[#40997] Monday, April 18, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ellter

Total Points: 311
Total Questions: 111
Total Answers: 117

Location: Lithuania
Member since Thu, Jul 14, 2022
2 Years ago
;