5

I need to remap IJKL to the arrow keys while alt is down.

Also, modifiers should still work ie: Shift+Ctrl+Alt+L should map to Shift+Ctrl+RightArrow

I was able to get this working using xbindkeys + xvkbd, but it wasn't working well because it looks like I lose focus every time it sends input, and it didn't work at all in the terminal.

Farzher
  • 295
  • 1
  • 4
  • 14

1 Answers1

2

There are a several more technical ways to do this that I have seen in other SE posts, but one of the easiest ways would be to install AutoKey. It is a full featured keyboard macro processor and it's easy to define simple macros for such a task.

AutoKey does a whole lot of other things easily and, if you know Python which is used as its macro language, you can get a keypress or phrase to do almost anything your system is capable of. And, it works with just about any program because, by default, its output appears to be coming directly from the keyboard exactly the same as if you were typing it.

Try it and see if it works for you. We don't currently have any developers on the project, but the support list is active and many people are successfully using it.

I just reread your question more carefully and the bit about the other modifier keys still working makes it more complicated because you would probably have to code a separate macro for each modifier combination with each key (i, j, k, l), but I think it would still work.

If you decide to try it, make sure you have the latest version (0.90.4) as many distros provide older versions that don't work as well.

Joe
  • 1,884
  • 1
    I tried AutoKey before, but it wasn't consuming input, remapping Alt + I to right arrow key worked, but it still executed Alt + I, which sometimes selects an item from the application menu. Do you know if this is still an issue? (Maybe I was using an old version or did something wrong) – Farzher Nov 28 '13 at 20:42
  • Don't know. Was it version 0.90.4? If you post your question on our forum/list https://groups.google.com/forum/#!forum/autokey-users (preferably including a trace generated by running autokey-gtk -l from a console), maybe someone will be able to solve the problem. – Joe Nov 30 '13 at 07:30
  • So, I don't have that application menu issue with autokey anymore. But it does have the same issue as xbindkeys of losing window focus quickly when it executes, and the performance of it is so bad it lags my computer. But it does work in the terminal. If I can figure out the performance issue, that's not too bad. – Farzher Dec 01 '13 at 20:24
  • Again, you may want to post to our list. I have had a number of problems using AutoKey, but performance has never been one of them. I'm not sure what you mean by losing window focus, but if it's what I think it is, it may be a problem generic to desktop environments when any gui program uses another gui one to get things done. I have a problem that sounds similar with yad (zenity fork) pop-up dialogs issued from bash scripts. – Joe Dec 02 '13 at 22:21