11

I'm trying to get rid of the Caps Lockkey and give it a better use. Since I constantly use the run command Alt+F2, I'd like to make Caps Lock trigger that action.

I've found a couple of questions related, using xmodmap, but none of them try to map Caps Lock to a combination of keys such as Alt+F2

How would I go about doing this?

Thanks!

  • After certain versions, you can't use super or cap alone for shortcuts. At least can't configure it that way in the keyboard shortcut gui. – hansioux Apr 18 '11 at 16:35
  • Please have a look here askubuntu.com/questions/1041674/… You should be able to adapt this answer for your purpose. – Sebastian Stark Jun 16 '18 at 10:20
6
  1. Install Xdotool Install xdotool and CompizConfig Settings Manager Install compizconfig-settings-manager from Ubuntu Software Center

  2. Disable Caps-Lock by opening Keyboard Preferences

    System ▸ Preferences ▸ Keyboard

    Goto tab Layouts then click the button Options...

    Change the key behaviour to CapsLock is disabled

    enter image description here

  3. Open CompizConfig Settings Manager

    • Use Run Command, Alt + F2, and type ccsm
  4. Enable Commands plugin then add the following

    • Add xdotool key alt+F2 to the first available command slot

    • Goto 'Key Bindings' tab. In the same slot number assign Caps Lock key.

      Note: It will show VoidSymbol as the button assigned but this is fine.

      enter image description here

      enter image description here

1

Going by what you mention here. You can disable CAPS LOCK by going to System ▸ Preferences ▸ Keyboard. Then in the window that opens Layouts ▸ Options.... Here you can change the CapsLock key behaviour and disable it.

  • Ok, and what about having 'capslock' as a substitute of 'alt+f2' for 'run command'? The only issue would be assigning an empty action to that key but still have it enabled, so I can use the 'keyboard settings' module to assign the 'run command' action to 'capslock' and NOT have it actually turn the capslock ON every time I hit it. Can you see what I mean? – user14539 Apr 18 '11 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy