Introducing how to press arrow keys with AutoKey in Ubuntu.
From the second time onward, it becomes hotkey + arrow key behavior, so itโs fine for a single press, but be careful when using it with continuous presses. It has good compatibility with home/end keys, but not so good with arrow keys that are used continuously.
# Example using ctrl+?? as hotkey
output = system.exec_command("xte 'key Control_L'")
keyboard.send_keys(output)
output = system.exec_command("xte 'key Up'")
keyboard.send_keys(output)