2

In Windows, you can use AutoHotKey to make Capslock a standalone key (say, binding it to 'escape') as well as a modifier (so that you can bind, say 'CapsLock + k', to launch a browser).

I've tried everything under sun to make CapsLock have its own special binding PLUS make it a modifier key in Ubuntu and Xubuntu, and tried various Autokey python scripts, but it seems this is not possible on Ubuntu/Xubuntu?

Am I wrong? Does anyone know a way this could be possible?

3 Answers 3

4
+25

Try this in a console:

setxkbmap -option caps:none
xmodmap -e 'keycode 66 = Multi_key';

Than your Caps-Lock work as a Compose key.

Ie: If you hit successively:

  • Compose, o, then e will render "œ",
  • Compose, o, then r will render "®",
  • Compose, 3, then 4 will render "¾",
  • Compose, o, then / will render "ø",
  • Compose, +, then - will render "±",
  • Compose, s, then s will render "ß",
  • ...

And so on.

1
  • Thanks F. Hauri, but I was specifically looking for a method where the capslock works as modifier keys when combining with another key. If not combining and released on his own, it will send a key event then. See my answer below.
    – ReneFroger
    Commented Nov 6, 2015 at 8:39
2

I finally found my solution with the Xcape which allows you to send key events when modifier keys are released on his own.

2
1

If you install gnome tweak-tool, you can redefine Caps-Lock from the Typing tab.

You can make it for instance an Escape or Ctrl. I've turned it into a BackSpace.

You can install it using:

sudo apt-get install gnome-tweak-tool

I'm running Ubuntu 14.04.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .