Native way to remap the capslock key to the key f18
for configuring the quick terminal within ghostty without using a tool like Karabiner Elements.
This renders capslock useless for any other task, but I only use capslock for my quickterm.
You can of course remap any other key.
Limitation: This remaps the capslock to only a single key which can't be used as a modifier key (perhaps unless you remap it to one, in which case just use the native MacOS modifier remapping setting in Preferences. This means you can't use it for keycombos. If you dedicate it like I did to just the quickterm, this shouldn't be an issue.
Configure ghostty for using f18
as the quick terminal hotkey. In the ghostty config, add, or modify the quick terminal
hotkey line to: