User Tools

Site Tools


howto:moveshiftkeyfor904ha

How to move the right Shift key, and add Emacs on 904HA Models


The existing HowTo entitled How to move the right Shift key is excellent, but the mappings are different on Asus 904HA EeePCs. Thus, the following script can be saved as the contents of setupkbd.sh, instead of the code that is given on that page, whenever one is trying to create a remapping script for Asus 904HA EeePCs. This script does not bother to try and change the functionality involving the 'Down' ←→ 'Right', or 'Fn-Down' (PgDn) ←→ 'Fn-Right' (End) mappings. Thus, the only keys that would need to be physically “swapped” on the keyboard, involve the 'Up' and 'Shift_R' keys. Another remapping was added to satisfy Emacs users, involving a swap between 'Caps_Lock' and 'Control_L'.

 #!/bin/sh
 
 # set -x
 
 # This script is intended to change the functionality of the 'Shift_R', 'Fn-Shift_R',
 # 'Up', 'Fn-Up', 'Caps Lock', 'Ctrl_L' key functionality for the keyboards of
 # Asus EeePC 904HA Netbooks
 
 
 # Change the keyboard layout, to exchange the 'Shift_R' and 'Up' key functionality
 xmodmap -e "keycode 62  = Up"		# Shift_R		=> Up
 xmodmap -e "keycode 111 = Shift_R"	# Up			=> Shift_R
 xmodmap -e "add shift   = Shift_R"	# Make the new Shift_R key actually do shifting
 xset  r 62				# Make the new Up key autorepeat
 xset -r 111				# Prevent the new Shift_R key from autorepeating
 
 # Change the keyboard layout, to exchange the 'Fn-Shift_R' and 'Fn-Up' (PgUp) key functionality
 xmodmap -e "keycode 62 = Prior"		# Fn-Shift_R		=> PgUp
 xset  r 62				# Make the new PgUp autorepeat
 xmodmap -e "keycode 112 = Control_R"	# PgUp			=> Control_R
 xset  r 112				# Make the new Fn-Shift_R autorepeat
 
 # Emacs Fix: This swaps the 'Caps Lock' with the left 'Ctrl' keys
 # IF you don't use emacs, then this might not do anything for you
 xmodmap -e "keycode 66  = Control_L"	# Caps_Lock		=> Control_L
 xmodmap -e "keycode 37  = Caps_Lock"	# Control_L		=> Caps_Lock
 xmodmap -e "add control = Control_L" 	# Make the new Shift key actually do shifting
 
 set +x
 echo "Asus EeePC 904HA Netbook keyboard remap complete."
howto/moveshiftkeyfor904ha.txt · Last modified: 2009/03/29 01:37 by odonncaoa