You are not logged in.

#1 2008-10-09 21:28:04

senjin
Member
Registered: 2006-09-15
Posts: 181
Website

strange numpad behaviour in X

My numpad behaves strangely with NumLock off: It should work as arrows, PgUp, PgDown keys etc... but when I run for example vi in terminal (tried xterm, rxvt-unicode, gnome-terminal, konsole...) it displays strange letters instead: when I push 7 (home) it displays "U" letter + linebreak, when I push 8 (arrow up) it displays "W" letter + linebreak instead, etc... It happens only in X, in the text mode numpad works properly.

It's not vi problem, it's the same in mc for example

This is part of my xorg.conf

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "keyboard"
    Option         "CoreKeyboard"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "pl"
    Option         "XkbVariant" ""
EndSection

I use xfce, compiz-fusion, but it's the same in kde...

Offline

#2 2008-10-26 09:00:30

senjin
Member
Registered: 2006-09-15
Posts: 181
Website

Re: strange numpad behaviour in X

I have tried to switch the "XkbLayout" to "us" - and then the numpad started to work. However, the super key stopped working and also (obviously) I was unable to type polish letters (ąćęńłóśżź) which I need...

Does anybody know how to have all the three things running at the same time: polish letters, numpad (in numlock off mode) and the super keys?

Offline

#3 2008-10-26 12:11:06

Lexion
Member
Registered: 2008-03-23
Posts: 510

Re: strange numpad behaviour in X

You could try using xmodmap for the numpad, and leave the keyboard as is now.


urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand

Offline

#4 2008-10-26 20:54:18

senjin
Member
Registered: 2006-09-15
Posts: 181
Website

Re: strange numpad behaviour in X

I added the following lines to my ~/.Xmodmap

keycode 63 = KP_Multiply
keycode 79 = KP_7
keycode 80 = KP_8
keycode 81 = KP_9
keycode 82 = KP_Subtract
keycode 83 = KP_4
keycode 84 = KP_5
keycode 85 = KP_6
keycode 86 = KP_Add
keycode 87 = KP_1
keycode 88 = KP_2
keycode 89 = KP_3
keycode 90 = KP_0
keycode 91 = KP_Decimal
keycode 108 = KP_Enter
keycode 112 = KP_Divide

It's better... the numpad works in tinyfugue, but not in vi or mc. Pushing the keys still generates some letter, just different than before wink KP_7 generates w, KP_8 x... I don't understand it.

Offline

#5 2009-04-09 11:05:57

senjin
Member
Registered: 2006-09-15
Posts: 181
Website

Re: strange numpad behaviour in X

After the xorg update and changing to evdev keyboard driver it turned out, that now right alt key has keycode 108, while the enter key on the numpad works properly without the xmodmap hacks. So I had to remove the "keycode 108 = KP_Enter" line from my .Xmodmap. It works properly now, but I don't understand anything.

Another issue I noticed is that the keycode 112 is assigned to Page Up key. I had to remove "keycode 112 = KP_Divide" from .Xmodmap. And the / key on the numpad works without any hacks.

Last edited by senjin (2009-04-10 15:08:49)

Offline

Board footer

Powered by FluxBB