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
.