I use Discord for a variety of communications. Discord has keybindings, but I donāt find them easy to remember, and some of them are difficult to type on a non-standard keyboard layout.
Iām not sure why applications offer keybindings but donāt allow the user to reconfigure them. Who wants to reach all the way to PGUP?
Anyway, I used Keyboard Maestro to rebind the keys to something vim-like:
Discord Default | Remapped to | What does it do? |
---|---|---|
Opt-UpArrow | Ctrl-P | Previous Server |
Opt-DownArrow | Ctrl-N | Next Server |
PGDOWN | Ctrl-D | Scroll chat down |
PGUP | Ctrl-U | Scroll chat up |
Cmd-K | Cmd-P* | Switch channels |
*this one is inherited from VSCodeās default shortcut for switching files rather than vim.
Keyboard Maestro itself is click-to-configure, which I donāt prefer. But it does allow conditional remapping based on the active app. I also use skhd, but Iām not sure how to do conditional remapping based on which application is open in skhd.
Keyboard Maestro stores its config in ~/Library/Application Support/Keyboard Maestro
as binary .plist
files. I can add these to my dotfiles git repo, but Iām not sure how to get meaningful diffs if I ever need them. But I donāt anticipate needing to diff these at the moment.