Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-02-06 23:28:03

stardustOne
Member
Registered: 2018-03-09
Posts: 7

Use mouse click as keyboard key archlinux + XFCE 4.12.1, no action

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

Board footer

Powered by FluxBB