0% found this document useful (0 votes)
80 views

Example Xmodmap Changes

The document provides instructions to remap keyboard keys using xmodmap. It clears default modifiers, maps the right shift key to tab, left shift to mode switch, right control to super, and makes various other key remappings, such as mapping caps lock to dollar sign and semicolon to dollar/semicolon/colon.

Uploaded by

acroali
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

Example Xmodmap Changes

The document provides instructions to remap keyboard keys using xmodmap. It clears default modifiers, maps the right shift key to tab, left shift to mode switch, right control to super, and makes various other key remappings, such as mapping caps lock to dollar sign and semicolon to dollar/semicolon/colon.

Uploaded by

acroali
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

#These are the keycodes on my machine for the listed key.

To find these on your


computer, run "xev" in a terminal and press the key. Somewhere in the output y
ou will see "keycode ###", and that is the number you will use to replace the on
e I have listed below.
#Left shift = 50
#Right shift = 62
#Left Control = 37
#Right Control = 105
#Left Alt = 64
#Right Alt = 108
#Search, caps lock = 133
#Tab = 23
#Underscore = 20
#Question Mark = 61
#Backslash = 51
#[ = 34
#] = 35
#( = 18
#) = 19
#volume up, down = 75, 76
#4 = 13
#Grave = 39

#Clear modifiers
xmodmap -e "clear shift"
xmodmap -e "clear control"
xmodmap -e "clear Mod1"
xmodmap -e "clear mod4"

#Right shift to tab


xmodmap -e "keycode 62 = Tab ISO_Left_Tab Tab ISO_Left_Tab"
#Left shift to mode switch
xmodmap -e "keycode 50 = Hyper_R"
xmodmap -e "keysym Hyper_R = Mode_switch"
#Left control stays
xmodmap -e "keycode 37 = Control_L" #Left control stays
xmodmap -e "add control = Control_L"
#Right control to super
xmodmap -e "keycode 105 = Super_R"
xmodmap -e "add Mod4 = Super_R"
#Left alt stays
xmodmap -e "keycode 64 = Alt_L"
xmodmap -e "add Mod1 = Alt_L"
#Right alt to shift
xmodmap -e "keycode 108 = Alt_R"
xmodmap -e "add shift = Alt_R"
#Caps to dollar sign
xmodmap -e "keycode 133 = 0x024"
#Semicolon to dollar, dollar, semicolon, colon
xmodmap -e "keycode 47 = 0x024 0x024 0x03b 0x03a"
#Make tab a backslash
xmodmap -e "keycode 23 = 0x05c"
#Underscore is always underscore
xmodmap -e "keycode 20 = 0x05f 0x05f"
#Slash and dollar goes to minus, minus, slash, question
xmodmap -e "keycode 61 = 0x02d 0x02d 0x02f 0x03f"
#Backslash to backslash, backslash, bar, bar
xmodmap -e "keycode 51 = 0x05c 0x05c 0x07c 0x07c"
#Four to caret, caret, four, four
xmodmap -e "keycode 13 = 0x05e 0x05e 4 4"
#curly braces normal, parens on mode switch
xmodmap -e "keycode 34 = 0x07b 0x07b 0x028 0x028"
xmodmap -e "keycode 35 = 0x07d 0x07d 0x029 0x029"
#Square brackets on parens
xmodmap -e "keycode 18 = 9 0x05b 9 0x05b"
xmodmap -e "keycode 19 = 0 0x05d 0 0x05d"
#Parens on top keys
xmodmap -e "keycode 75 = 0x028"
xmodmap -e "keycode 76 = 0x029"
#Colon and semicolon on top keys
xmodmap -e "keycode 74 = 0x03a"
xmodmap -e "keycode 73 = 0x03b"
#Grave to minus, tilde, grave, tilde
xmodmap -e "keycode 49 = 0x2d 0x07e 0x060 0x07e"
#Ampersand and asterisk to regular
xmodmap -e "keycode 16 = 0x026 0x026 7 7"
xmodmap -e "keycode 17 = 0x02a 0x02a 8 8"
#Comma and period normal, less/greater on mode switch
xmodmap -e "keycode 59 = 0x02c 0x02c 0x03c 0x03c"
xmodmap -e "keycode 60 = 0x02e 0x02e 0x03e 0x03e"
#Equals normal, plus on mode switch
xmodmap -e "keycode 21 = 0x03d 0x03d 0x02b 0x02b"

You might also like