LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Tags used in this thread
Popular LQ Tags , , ,

Reply
 
Thread Tools
Old 06-28-2008, 02:31 PM   #1
leeko
LQ Newbie
 
Registered: Jun 2008
Posts: 18
Thanked: 0
Remapping keys using xmodmap - "home" key


[Log in to get rid of this advertisement]
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 02:34 PM..
leeko is offline  
Tag This Post , , ,
Reply With Quote

Reply

Bookmarks


Thread Tools

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 03:54 PM
How might I restore kmail folders/mail/settings from a "badly" saved "home"? deh6 Linux - Software 5 03-08-2008 10:25 PM
"Installing non-distro Linux on USB key" or "Using syslinux to boot a jffs2" lymae Linux - Newbie 6 12-31-2006 11:00 PM
MandrivaLinux 2006 - Using Mozilla FireFox "Home key has the refresh icon" JBailey742 Linux - Software 4 04-24-2006 06:13 AM
"<" ">" Keyboard keys on Toshiba Satellite 1005-s157 dont work RodCas Linux - Laptop and Netbook 1 05-08-2004 05:22 PM


All times are GMT -5. The time now is 08:45 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration