Joe Edmonds Blog
   

Email

Subscribe
RSS



See more of joe's picks at ThisNext.
Shopcast
powered by
ThisNext


       
Sat, 07 Jan 2006

Xmodmap for Sager NP5720 keyboard in linux

The default keyboard layout for my new Sager NP5720 laptop had some problems. The numeric keypad's PgUp and PgDown keys almost worked except, when the shift key was depressed, they would output the numbers 9 and 3 even though Num Lk was off. This is a pain because linux terminals use shift-PgUp/PgDown to scroll.

After an hour of research, twiddling, and trial-and-error I found that this fixed the problem:

xmodmap -e "keycode 81 = Prior Prior KP_9 Prior"
xmodmap -e "keycode 89 = Next Next KP_3 Next"

I used "Prior" instead of "KP_Prior" because the gnome app evince didn't understand ctrl-KP_Prior. I'm sure this will come back to bite me someday when I'm playing a game or something.

This approach also has the drawback that it breaks the 3 and 9 keys when num lock is on. But I never really use the numeric keypad, so this isn't a problem for me.

[] permanent link