NiggiBS
Posts: 8
Joined: Thu Nov 30, 2017 3:03 pm

Python and xdotool -> keydown problem

Thu Dec 07, 2017 3:14 pm

I use a python script to interpret GPIO-signals and to set keydown-events as such:

Code: Select all

os.system('export DISPLAY=:0 && xdotool keydown l')
The GPIO-signals are sent by buttons and joysticks and the events are sent to firefox-esr.

My problem is, that when I move a joystick multiple events are sent to firefox even after I have released it.
This doesn't happen when a key-event is sent:

Code: Select all

os.system('export DISPLAY=:0 && xdotool key l')
Why does this happen?

NiggiBS
Posts: 8
Joined: Thu Nov 30, 2017 3:03 pm

Re: Python and xdotool -> keydown problem

Fri Dec 08, 2017 9:19 am

Update:
I found out where my problem lies. On keydown, xdotool sends out the event repetedly until the keyup-Event is fired. Unfortunately when I move my joystick to fast the keyup-Event isn't sent at all ... so the keydown-Event is sent forever :cry:

Return to “Python”

Who is online

Users browsing this forum: No registered users and 23 guests