Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Applications
Reload this Page Remapping keys using xmodmap - "home" key
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Applications I cant get "X" app to work... also discussion about linux programs.

Reply
 
Thread Tools Display Modes
Old 06-28-2008   #1 (permalink)
lee_alkureishi
Just Joined!
 
Join Date: Jan 2008
Posts: 4
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
lee_alkureishi is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 10:00 PM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.0.0