This is the biggest thing keeping me from enjoying Ubuntu/Linux.
Ideally I'd like to just be able to run my AutoHotKey script on Ubuntu, but I didn't have much luck getting that working with Wine.
Here's what I'm doing in AHK (using extra modifiers also works, Shift+Alt+l is Shift+right).
!l:: Send, {Right}
+!l:: Send, +{Right}
^!l:: Send, ^{Right}
^+!l:: Send, ^+{Right}
I tried AutoKey, 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.
The closest I got was xbindkeys
for setting up hotkeys, this seems to work great. And xvkbd
for simulating input; this part is really buggy; it doesn't work in all programs, and causes me to lose focus a lot, among other issues.
For anyone wondering what I'm trying to do: I use I J K L as arrow keys while Alt is down.
Best Answer
I've never used xvkbd, but there are two other great programs for simulating keyboard input that I like and use. One is
xte
and the other isxdotool
.Both
xdotool
andxte
are very similar, but since I usexte
the most I'll go into that one.xte:
The most basic syntax for
xte
is:xte
can do a lot more than just create keyboard input though, it can also move your mouse and simulate mouse button presses, among others things.Syntax examples:
To call a single key press:
xte 'key keyName'
To call a key combination:
xte 'keydown keyName' 'keydown secondKeyName' 'keyup keyName' 'keyup secondKeyName
To call a mouse button:
xte 'mouseclick buttonNumber'
(You can find button numbers throughxev
)To move the mouse:
xte 'mousemove xCoordinate yCoordinate'
And more! Read
man xte
Keynames:
Here are a list of key names (other than the obvious ones):
Reading:
You might also be interested in reading:
How can I change what keys on my keyboard do? (How can I create custom keyboard commands/shortcuts?)
How do I remap certain keys or devices?