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.