I have a certain shell (zsh) script which reads one character at a time and performs an action afterwards. In the shell, this is realized by "read -k" in a loop. I want to execute the script as a keyboard shortcut, without opening a shell.
What is the easiest way to grab keyboard input for this? I could use dmenu if I wanted to read an entire string, but the script needs to be able to parse the characters one at a time.