My laptop's Escape key recently got broken so I temporarily mapped it to Super + X using AutoKey via keyboard.fake_keypress("<escape>")
. However, I found that this doesn't hold down the Escape button but instead presses it once only. How do I script it to where as long as I'm holding down the key combination Super + X, the Escape button is also simulated held down. When I release, it also gets simulated released.
Asked
Active
Viewed 1,175 times
0

user9564371
- 103
-
You better arrange this at a lower system level, using xbindkeys. See https://askubuntu.com/questions/254424/how-can-i-change-what-keys-on-my-keyboard-do-how-can-i-create-custom-keyboard – vanadium Dec 25 '18 at 07:33
-
Should rather be xmodmap, the second answer in that link. – vanadium Dec 25 '18 at 07:40
1 Answers
0
This is not possible with a high-level keyboard macro tool such as Autokey. You should remap your broken key using more low-level tools. xmodmap
is installed by default, and allows to modify the keymap. For guidelines on how to proceed, see the excellent answer of Kevin Bowen, Xev and xmodmap, to the question How can I change what keys on my keyboard do? here on Ask Ubuntu.

vanadium
- 88,010