How to remap a single key? I have a broken key on my Mac's keyboard and I need to remap it to some other key, by double press. Temporarily.
It's not a special but an alphabet letter one. I want to remap it this way:
&quot;f&quot; (broken) --&gt; &quot;double a&quot;

How can one do it? Preferably without any third-party tool.
update1
This hasn't worked - double a won't get replaced with f whenever I type &quot;aa&quot; anywhere on my laptop. I want it to replace double a with f on the fly.
If the broken key is one of the characters, not function, or modifier keys:
Set up a text replacement for say ZZ -&gt; A (broken key).
System preferences &gt; Keyboard &gt; Text.

https://support.apple.com/guide/mac-help/change-keyboard-text-preferences-on-mac-mh27071/10.14/mac/10.14.6

Word and other non-Apple apps can have their own text-replacement preferences that would have have to be set.
A long-winded way is to set up a &quot;Service&quot; or a Script Editor's &quot;Script&quot; to keystroke the key you need.

How do I automate a key press in AppleScript?