Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am starting to run up against the limits of XKB, the keyboard subsystem of the X window system.

I would like to know if there is a way I can gain more flexibility. Here are examples of the kind of freedom I would like to obtain:

  • When pressing CapsLock+w, generate Ctrl+Right.
  • When pressing f d in rapid succession (but not slowly), generate Escape.
  • When pressing Ctrl+Space, generate 4 spaces.

What are some ways I could obtain this? Is there a replacement for XKB? Should I simply modify XKB itself? Is there a way to get closer to full programmatic control of the keyboard behavior?

share|improve this question
I hope those are just examples and not actual use cases... But if they are, I can't help but be curious. – Suchipi Aug 4 '13 at 16:52

Employ an extensible input method framework such as scim or ibus. The last one is possible out of the box by configuring the m17n backend, but I suspect the first two require you to program your input method.

share|improve this answer
Ah I had been wondering if an input method framework might get me there but I had been utterly at a loss where to begin. Do you know any references or examples to start with for my kind of unusual goals? Also, which do you recommend -- scim or ibus? – Owen Aug 5 '13 at 3:29
Join the IME mailing list for your distro: opensuse-m17n, Debian pkg-ime-devel etc. – daxim Aug 5 '13 at 6:06

I think it's relatively simple to accomplish some of what you want with Autokey.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.