debug joy jaune
This commit is contained in:
@@ -33,7 +33,7 @@ def find_device():
|
|||||||
def is_dolphin_running():
|
def is_dolphin_running():
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output(
|
output = subprocess.check_output(
|
||||||
["flatpak", "ps", "--columns=name"]
|
["flatpak", "ps"]
|
||||||
).decode()
|
).decode()
|
||||||
return "org.DolphinEmu.dolphin-emu" in output
|
return "org.DolphinEmu.dolphin-emu" in output
|
||||||
except Exception:
|
except Exception:
|
||||||
@@ -51,7 +51,9 @@ def handle_device(dev_path):
|
|||||||
# cas spécial : joystick jaune (BTN_THUMBR, code 318)
|
# cas spécial : joystick jaune (BTN_THUMBR, code 318)
|
||||||
if key_code == "318" and event.value == 1: # pression
|
if key_code == "318" and event.value == 1: # pression
|
||||||
keyboard.emit(uinput.KEY_LEFTALT, 1)
|
keyboard.emit(uinput.KEY_LEFTALT, 1)
|
||||||
|
time.sleep(0.02)
|
||||||
keyboard.emit(uinput.KEY_ESC, 1)
|
keyboard.emit(uinput.KEY_ESC, 1)
|
||||||
|
time.sleep(0.05)
|
||||||
keyboard.emit(uinput.KEY_ESC, 0)
|
keyboard.emit(uinput.KEY_ESC, 0)
|
||||||
keyboard.emit(uinput.KEY_LEFTALT, 0)
|
keyboard.emit(uinput.KEY_LEFTALT, 0)
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user