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)
|
sys.exit(0)
|
||||||
return
|
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'):
|
elif line.startswith('key release'):
|
||||||
print(line, file=sys.stderr)
|
print(line, file=sys.stderr)
|
||||||
button = line.split()[-1]
|
button = line.split()[-1]
|
||||||
@ -106,7 +107,7 @@ async def keyboardinp():
|
|||||||
if button == '37':
|
if button == '37':
|
||||||
is_ctrl = False
|
is_ctrl = False
|
||||||
|
|
||||||
print('DISPLAY=:0 xdotool keyup {}'.format(button))
|
print('DISPLAY=:0 xdotool keyup 0{}'.format(button))
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
tasks = []
|
tasks = []
|
||||||
|
Reference in New Issue
Block a user