Basically, I've been using 2 bits of software, pikeyd (https://github.com/mmoller2k/pikeyd) and python-uinput (https://github.com/tuomasjjrasanen/python-uinput) both of which are completely unrelated, except for 3 things, both are used for simulating key press events, use uinput and neither can repeat keys.
As far as I and MMoller2k can tell, our separate bits of software, 1 in python and the other in C cannot repeat keys, even thou nothing says they shouldn't.
And I guess what I'm asking is if there is a bug in uinput or both our bits of software. I can't vouch for my C friend, but my python script is so simple I cant see what could go wrong.
Code: Select all
import uinput
import time
fake_gpio = 0 #No Signal
events = (uinput.KEY_X, uinput.KEY_H, uinput.KEY_E, uinput.KEY_L, uinput.KEY_O)
device = uinput.Device(events)
def press(key):
device.emit(key, 1)
time.sleep(0.08)
device.emit(key, 0)
return 0
fake_gpio = 1 #Signal
cycle = 0
while fake_gpio:
if cycle == 0:
press(uinput.KEY_X)
time.sleep(0.3)
elif cycle == 30:
fake_gpio = 0 #No Signal
cycle = 0
break
else:
press(uinput.KEY_X)
cycle += 1
press(uinput.KEY_H)
press(uinput.KEY_E)
press(uinput.KEY_L)
press(uinput.KEY_L)
press(uinput.KEY_O)Code: Select all
import uinput
import time
events = (uinput.KEY_X, uinput.KEY_H, uinput.KEY_E, uinput.KEY_L, uinput.KEY_O)
device = uinput.Device(events)
device.emit(uinput.KEY_X, 1)
time.sleep(2)
device.emit(uinput.KEY_X, 0)Can anyone please help, this issue has been driving me loopy for the last week or so.
Insane Laughter of a psychopath >