Linux - NewbieThis forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I'm running Xandros linux on an EeePC, and I'm trying to remap some of the keyboard keys, with varying success. The reason is that the right shift key and fn key are less-than-ideally placed. I've physically swapped the right-shift and up keys, so that my layout now looks like this:
-----------------shift--up
menu--left--right-down
where "menu" is the "context menu" key.
I used the following startup script to remap them:
#!/bin/sh
# set up keyboard to exchange the Shift and Up keys, and the Down and Right keys
xmodmap -e "keycode 62 = Up" # Shift => Up
xmodmap -e "keycode 109 = Prior" # Shift-shift => PgUp
xmodmap -e "keycode 98 = Shift_R" # Up => Shift
xmodmap -e "keycode 99 = Control_R" # PgUp => Shift-shift
xmodmap -e "keycode 104 = Right" # Down => Right
xmodmap -e "keycode 105 = End" # PgDn => End
xmodmap -e "keycode 102 = Down" # Right => Down
xmodmap -e "keycode 103 = Next" # End => PgDn
xmodmap -e "add shift = Shift_R" # Make the new Shift key actually do shifting
xset r 62 # Make the new Up key autorepeat
xset r 109 # Make the new PgUp autorepeat
xset -r 98 # Prevent the new Shift key from autorepeating
-----------
This script works perfectly. However, I'm also trying to use xmodmap to allow me to use the left/home, right/end, up/pageup, and down/pagedown keys with the menu key as a mode-switcher (i.e menu+up=pageup). I'm using this script (modified from a script posted on another eeeuser.com):
# fix key mappings for Menu + up/down/left/right
xmodmap -e "keycode 117 = Mode_switch"
xmodmap -e "keycode 97 = Left NoSymbol Home"
xmodmap -e "keycode 62 = Up NoSymbol Prior"
xmodmap -e "keycode 104 = Right NoSymbol End"
xmodmap -e "keycode 102 = Down NoSymbol Next"
I appended this to my existing startup script, and it *almost* does everything I need. The one problem: The "home" key has stopped working. The left key works fine (home is fn+left). The left/home key's physical position has not been altered, so I thought that
xmodmap -e "keycode 97 = Left NoSymbol Home"
would do the trick, but no joy... If anyone can shed some light on this, it would make me a very happy camper!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.