Skip to content

Instantly share code, notes, and snippets.

@robbiemu
Created January 17, 2012 19:41
Show Gist options
  • Save robbiemu/1628402 to your computer and use it in GitHub Desktop.
Save robbiemu/1628402 to your computer and use it in GitHub Desktop.
in .Xmodmap:
remove Lock = Num_Lock
keysym Num_Lock = Scroll_Lock
keysym Scroll_Lock = Num_Lock
add mod2 = Num_Lock
keycode 77 = e
remove mod2 = e
in custom Startup Program:
Name: xmodmap
Command: xmodmap ~/.Xmodmap
Comment: NumLock/ScrollLock reassignment
expected behavior:
Scroll Lock acts as both scroll Lock and num Lock. num Lock acts as "e", and does not act as num Lock.
actual behavior:
The scroll Lock key works as expected. The num Lock key always outputs "e", which is as expected. When the numberpad is locked to numbers (on), the num Lock key also *turns off* that state. Ie, it prints "e" and toggles the number lock. When the numberpad is unlocked (off), the num Lock key works as expected (does not toggle num lock).
If I run: xmodmap -e "remove mod2 = e" from the commandline after startup, I get the behavior expected. However, this line is already added in the .Xmodmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment