ydotool
ydotool copied to clipboard
Separate mouse down and release
Is it possible to instead of simulating a "click", we can simulate pressing down and releasing separately? So we can do things like:
ydotool mousedown 0XC0; ydotool mousemove -- 100 100; ydotool mouserelease 0XC0 to simulate a drag and drop.
https://github.com/ReimuNotMoe/ydotool/blob/master/manpage/ydotool.1.scd
according to this manpage, you can send --up or --down!
still haven't tested it, but I will soon!
As a happy ydotool user, I've succesfully mapped this to the keyboard through a gnome extension: https://extensions.gnome.org/extension/1336/run-or-raise/ . Now, I control the drag-and-drop via numpad keys.
<Super>KP_Add,bash -c "sleep 0.2 && ydotool click 0x40" # drag has to start with sleep since non-released keys would interfere otherwise causing no file being dragged while still entering the drag-mode (nothing works until Esc or mouse up, neither click works)
<Super>KP_Subtract,ydotool click 0x80 # drop cannot be a layered shortcut since basic keys seem disabled by system when dragging