You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Further to discussion here: tuomasjjrasanen/python-uinput#6 (comment), we have noticed that attempting to use suinput_create, and then immediately suinput_emit will not work, likely because suinput_create isn't blocking until it's ready. It returns immediately.
Might this be because we're opening the uinput device with O_NONBLOCK? Alternatively, I notice in the uinput kernel examples, they also use a sleep(1), but say that "This pause is only needed in our example code". Any idea how we can have libsuinput do this for us?
/*
* On UI_DEV_CREATE the kernel will create the device node for this
* device. We are inserting a pause here so that userspace has time
* to detect, initialize the new device, and can start listening to
* the event, otherwise it will not notice the event we are about
* to send. This pause is only needed in our example code!
*/
The text was updated successfully, but these errors were encountered:
Further to discussion here: tuomasjjrasanen/python-uinput#6 (comment), we have noticed that attempting to use
suinput_create
, and then immediatelysuinput_emit
will not work, likely becausesuinput_create
isn't blocking until it's ready. It returns immediately.Might this be because we're opening the uinput device with
O_NONBLOCK
? Alternatively, I notice in theuinput
kernel examples, they also use asleep(1)
, but say that "This pause is only needed in our example code". Any idea how we can havelibsuinput
do this for us?The text was updated successfully, but these errors were encountered: