You are not logged in.
Hi,
Based on this :
#!/bin/bash
set -x
exec &>/tmp/log
id=$(
xinput list |
awk '/Dell USB Keyboard/{print gensub(/.*id=([0-9]+).*/, "\\1", "1")}'
)
xdotool mousedown $1
while IFS= read -r event; do
if [[ $event == *release* ]]; then
xdotool mouseup $1
exit
fi
done < <(xinput test $id)
This works very well under Debian9 and Cinnamon 3.2.7, but not under Archlinux X86_64 + XFCE 4.12.
# My tests
The log when I press F1 key to drag & drop the border of a GUI application :
press :
+xinput list
+awk '/Dell USB Keyboard/{print gensub(/.*id=([0-9]+).*/, "\\1", "1")}'
+id=10
+xdotool mousedown 1 # executed, but no action !
+IFS=
+read -r event
+xinput test 10
release key :
+[[ key release 67 == *release* ]]
+xdotool mouseup 1
+exit
The code is ran from xfce4 keyboard shortcuts configuration panel.
What is wrong ?
If I remove code and keep only
xdotool mousedown 1
I can drag & drop ! (but can't release it)
Any idea what's going bad?
Offline
[ Generated in 0.009 seconds, 8 queries executed - Memory usage: 511.38 KiB (Peak: 512.22 KiB) ]