I want to:
- Turn off
capslockwhen hitting thecapslock key Escapewhen hitting thecapslock key- Behave like
ctrlwhen pressing down thecapslock key
What I have in my ~/.Xmodmap:
!Set Capslock to LCtrl
remove Lock = Caps_Lock
remove Control = Control_L
keycode 66 = Control_L
add Control = Control_L
!Set Escape to Capslock
keycode 9 = Caps_Lock
add Lock = Caps_Lock
!Dummy Escape Key for XCape
keycode 254 = Escape
What I have at the end of my ~/.profile:
$HOME/xcape/xcape -e 'Control_L=Escape' # Run xcape after login
Things work mostly as expected with just Xmodmap, and mostly as expected with Xmodmap + $HOME/xcape/xcape -e 'Control_L=Escape' when not run from .profile.
I get some strange behaviors when it runs from .profile; capslock key still toggles capslock in addition to behaving as esc and ctrl. My left ctrl exhibits this exact behavior as well.
Maybe I should be running this from somewhere other than .profile?
Edit: tried running $HOME/xcape/xcape -e 'Control_L=Escape' from xubuntu's menu -> settings manager -> Session and Startup -> Application Autostart with no effect at all.