Сопоставьте цифровую клавиатуру с цифровыми клавишами

1335
Rubén Marrero

Я хочу, чтобы числа на цифровой клавиатуре были точно такими же, как и на обычных цифрах, поэтому, если я Shift+1нажму на цифровую клавиатуру, я хочу !напечатать. Есть ли простой способ сделать это?

1

1 ответ на вопрос

2
Rubén Marrero

Ok, I could figure out the answer by following this instructions, I'll let here the answer just in case it is useful for someone else.

numbers 1-7 (english layout):

xmodmap -e 'keycode 87 = 1 exclam' xmodmap -e 'keycode 88 = 2 at' xmodmap -e 'keycode 89 = 3 numbersign' xmodmap -e 'keycode 83 = 4 dollar' xmodmap -e 'keycode 84 = 5 percent' xmodmap -e 'keycode 85 = 6 asciicircum' xmodmap -e 'keycode 79 = 7 ampersand' 

It has no sense for number 8 to be * as in english layout since it already is on the numpad I binded it to what it would be in spanish layout instead which is: (. Same thing happens with 9 which would be the same as: ) and 0 which would be: =.

xmodmap -e 'keycode 80 = 8 parenleft' xmodmap -e 'keycode 81 = 9 parenright' xmodmap -e 'keycode 90 = 0 equal' 

Optionally you could bind number 2 to " when used with shift and @ when used with alt (It would overwrite original behaviour of course):

xmodmap -e 'keycode 88 = 2 quotedbl NoSymbol NoSymbol at at' 

makes changes persistent:

xmodmap -pke >~/.Xmodmap 

PS: to actually do those changes permanent you should execute xmodmap ~/.Xmodmap somewhere in your ~/.Xinitrc file and/or whenever you change your layout with setxkbmap

Если вы полностью удовлетворены решением, вы можете выбрать его в качестве принятого ответа. Slizzered 9 лет назад 0
Кажется, мне нужно подождать 48 часов с момента, когда я его попросил (осталось еще 21 час). http://oi57.tinypic.com/e67x34.jpg. Я отмечу это как ответ, как только это время пройдет. Rubén Marrero 9 лет назад 0