8

I would like to simulate keyboard combinations.

I am able to do this on Windows with AutoHotKey.

Is there an equivalent app for Ubuntu?

lipton
  • 889
  • 5
  • 19
  • 32
  • 1
    to answer this question correctly: what is the DE (desktop environment, aka 'kde', 'gnome', 'xfce' etc) you are using? if you answer that, one would check out how to bind keys to certain actions. – akira Sep 20 '09 at 06:54
  • 2
    I think it's safe to say that Ubuntu implies gnome unless otherwise noted. – itsadok Oct 06 '09 at 06:20
  • I'm using Gnome. – lipton Oct 29 '09 at 20:40

5 Answers5

6

The links in nik's answer are a bit old but still pretty useful, although there have been quite a few advancements since then. There is IronAHK currently available which is a complete rewrite of AutoHotkey which works under .NET as well as Mono, allowing it to have cross-platform compatibility. It's also free and fully open source.

Sparkler
  • 213
  • 1
  • 2
  • 10
John T
  • 163,373
  • 27
  • 341
  • 348
  • 1
    Very promising, but the project doesn't seem to have made any releases yet. I don't see any option other than to fetch and compile the source yourself. Has anyone used it? –  Sep 24 '09 at 22:51
5

Brainstorm Ubuntu: Idea #588: AutoHotkey for Ubuntu (automation, hotkeys) has some notes.
You may also want to look at AutoKey - the (totally rewritten) text expansion and hotkey utility.

Finally, this older Idea #163: Sytem-wide shortcut configuration refers many discussions on the subject. Like akira comments, your desktop environment may already support easy key bindings.

nik
  • 55,788
  • 10
  • 98
  • 140
2

Landed here earlier while searching for one myself.

There is now a opensource & cross platform alternative.
Robotjs handles mouse, keyboard, and screen(pixels) inputs with js code.

http://robotjs.io/

Example from the website:

// Type "Hello World" then press enter.
var robot = require("robotjs");

// Type "Hello World".
robot.typeString("Hello World");

// Press enter.
robot.keyTap("enter");
Sohail05
  • 21
  • 1
  • 1
    From FAQ: Q: *Why is missing from the keyboard functions?* A: *We’ve been implementing keys as we need them. Feel free to create an issue or submit a pull request!* Well, that's... peculiar. – Dragomok Jun 17 '17 at 19:07
1

I believe you should be able to do this with xbindkeys+xvkbd. That is, install xbindkeys, xbindkeys-config, xvkbd. Configure xbindkeys to call xvkbd on Windows keys, i.e. in ~/.xbindkeysrc, add:

"sleep 0.2 && /usr/bin/xvkbd -text "\A\t""
    c:115
"sleep 0.2 && /usr/bin/xvkbd -text "\A\t""
    c:116

If this works, add xbindkeys to System > Preferences > Sessions > Startup Programs and maybe disable default assignments in ~/.xbindkeysrc

user7963
  • 1,487
  • 11
  • 8
1

there is a port in progress ahklinux

Naveen
  • 343
  • 3
  • 7