LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux 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

Reply
 
Search this Thread
Old 06-28-2008, 01:31 PM   #1
leeko
LQ Newbie
 
Registered: Jun 2008
Posts: 18

Rep: Reputation: 0
Remapping keys using xmodmap - "home" key


Hi all,

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!

Thanks in advance,

Lee

Last edited by leeko; 06-28-2008 at 01:34 PM.
 
  


Reply

Tags
eee, remapping, xandros, xmodmap


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linux operating system built-in telnet command can use "VT400" function keys and key? hocheetiong Linux - Newbie 1 05-27-2008 02:54 PM
How might I restore kmail folders/mail/settings from a "badly" saved "home"? deh6 Linux - Software 5 03-08-2008 09:25 PM
"Installing non-distro Linux on USB key" or "Using syslinux to boot a jffs2" lymae Linux - Newbie 6 12-31-2006 10:00 PM
MandrivaLinux 2006 - Using Mozilla FireFox "Home key has the refresh icon" JBailey742 Linux - Software 4 04-24-2006 05:13 AM
"<" ">" Keyboard keys on Toshiba Satellite 1005-s157 dont work RodCas Linux - Laptop and Netbook 1 05-08-2004 04:22 PM


All times are GMT -5. The time now is 02:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration