2

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?

1
  • 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, 2013 at 16:52

3 Answers 3

1

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.

2
  • 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, 2013 at 3:29
  • Join the IME mailing list for your distro: opensuse-m17n, Debian pkg-ime-devel etc.
    – daxim
    Aug 5, 2013 at 6:06
0

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

0

daxim's suggestion of using an input method is a good one, particularly if you need to support non-Latin letters.

For my case, since I do not need to support non-Latin letters, I ended up tapping directly into the Linux event handling system.

I ended up creating a generic key remapping tool to accomplish this.

You must log in to answer this question.

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