Description
When I use an IceWM key binding that runs xdotool type, entering a string that ends with a backslash (\) causes xdotool to continuously emit characters instead of typing the string once.
This can effectively take over the desktop. It starts sending characters into whatever window currently has focus, and every time I close one window, the next focused window gets hit again. I could not safely click close buttons, type normally, or recover control because the input kept firing into the active window.
In Firefox, it opened new windows and even asked a question in Meta AI (on whatsapp desktop). In the terminal, it kept typing over and over again. I was unable to use the keyboard normally or identify the process to kill before regaining control.
The result is a string of characters in ANY window that the mouse cursor is in (focus). The culprit is the \ (with no space) at the end of the key binding.
The issue appears to be triggered by the trailing \ at the end of the text to output.
key "Ctrl+o" xdotool sleep 0.3 type --clearmodifiers "cC,XPpIDEay+Al^8\"
This outputs a stream of characters the currently focused window and you perform a hard reset.
Steps to reproduce
- Add any key binding to the IceWM keys file that uses xdotool to output text which ends with a backslash \
- Restart icewm so the binding will load
- Press the key binding (Ctrl-o in the case above)
Expected behavior
- The string should be typed once.
Actual behavior
- The typed string continues repeating as a stream of characters in the currently focused window. This can make the desktop difficult or impossible to use until the input stops (turn off the computer).
Workaround
- A workaround is to pass the text through the clipboard instead:
key "Alt+Shift+oo" sh -c 'sleep 0.3; printf "%s" "cC,XPpIDEay+Al^8\\" | xclip -selection clipboard; xdotool key --clearmodifiers Shift+Insert'
Environment
Description
When I use an IceWM key binding that runs
xdotool type, entering a string that ends with a backslash (\) causes xdotool to continuously emit characters instead of typing the string once.This can effectively take over the desktop. It starts sending characters into whatever window currently has focus, and every time I close one window, the next focused window gets hit again. I could not safely click close buttons, type normally, or recover control because the input kept firing into the active window.
In Firefox, it opened new windows and even asked a question in Meta AI (on whatsapp desktop). In the terminal, it kept typing over and over again. I was unable to use the keyboard normally or identify the process to kill before regaining control.
The result is a string of characters in ANY window that the mouse cursor is in (focus). The culprit is the \ (with no space) at the end of the key binding.
The issue appears to be triggered by the trailing
\at the end of the text to output.This outputs a stream of characters the currently focused window and you perform a hard reset.
Steps to reproduce
Expected behavior
Actual behavior
Workaround
Environment