Linux keyboard macro X11

8,400

I would like to suggest autokey or xbindkeys.

The autokey has GTK and QT GUIs, it supports python scripts and text pasting.

The xbindkeys is a more low-level thing, but you may prefer it since you decided to use dwm. I can't find a good how-to for Debian, so here is an article on Arch Wiki, it should give an idea of how to use it.

Both tools allow to execute some commands or scripts, but actually they can't repeat keystrokes out of the box. If you need to send some keyboard events to the X server (which is different from pasting some text), then you can use xdotool in combination with autokey or xbindkeys.

All these tools are available in the official Debian repositories, so it is easy to install them with apt-get.

Share:
8,400

Related videos on Youtube

iveqy
Author by

iveqy

Updated on September 18, 2022

Comments

  • iveqy
    iveqy over 1 year

    I'm using debian linux with X11 and dwm as a window manager. I have an application that make me press the same key three times in a row, I want to automate this, so instead of pressing three times I would only have to press F1 (or any other key) once.

    How do I do this?

  • iveqy
    iveqy almost 10 years
    Thanks, xdotool seems to do the job, xbindkeys can be replaced by dwm
  • Frepa
    Frepa about 9 years
    autokey on its own worked well for me for sending key-presses. In scripts, keyboard.send_key("<down>") can be used to send the down arrow key, for example. See the included example scripts.