Add leading zeroes to xdotool to force interpretation as keycodes
Fixes bug where e.g. Escape would be interpreted as the number 9
This commit is contained in:
parent
823bad796c
commit
23a3f6f5ca
@ -98,7 +98,8 @@ async def keyboardinp():
|
||||
sys.exit(0)
|
||||
return
|
||||
|
||||
print('DISPLAY=:0 xdotool keydown {}'.format(button))
|
||||
# Add leading 0 to force interpretation as key code
|
||||
print('DISPLAY=:0 xdotool keydown 0{}'.format(button))
|
||||
elif line.startswith('key release'):
|
||||
print(line, file=sys.stderr)
|
||||
button = line.split()[-1]
|
||||
@ -106,7 +107,7 @@ async def keyboardinp():
|
||||
if button == '37':
|
||||
is_ctrl = False
|
||||
|
||||
print('DISPLAY=:0 xdotool keyup {}'.format(button))
|
||||
print('DISPLAY=:0 xdotool keyup 0{}'.format(button))
|
||||
|
||||
async def main():
|
||||
tasks = []
|
||||
|
Reference in New Issue
Block a user