KeyBindings with no KeyBinding file?

MPU world, I’m stumped. At some point in the past, I installed several of Brett Terpstra’s Keybindings, in particular Command-Enter to create a new line after the current paragraph. I now need to use that shortcut for a different program; however, I cannot find my KeyBinding file anywhere. There is no KeyBinding folder in System/Library or ~/Library, and a search of my Mac using Finder, Spotlight and Alfred do not return any KeyBinding files. I’ve also looked through my workflows in Alfred, Keyboard Maestro, Karabiner, and BTT to see if I used those programs to create the bindings, with no luck.

Any suggestions on how to identify the culprit (or locate the KeyBinding file) would be greatly appreciated!

According to Brett’s project page the file is ~/Library/KeyBindings/DefaultKeyBinding.dict

If it’s not there then I would suggest a bit of terminal-fu, namely the find command.

If the file really doesn’t exist on your system, perhaps you created these bindings another way, like Keyboard Maestro or maybe Apple’s built-in Text Replacements.

Good thought on Terminal!

I also have Brett Terpstra’s Keybindings but I can’t get a lot of them to function and the ones that do function, function in Drafts only. Can the cause be that I have Karabiner installed? Also, I can’t seem to find a good resource on how to edit that file, does anyone have any suggestions?

If you’re talking about editing the keybinding file, you need a plain text editor. If you haven’t got a favorite already installed you can use TextEdit.

BTW Brett’s pretty good about responding to email queries, albeit sometimes a bit terse.

I have a text editor.

I do talk to Brett on Twitter. I understand.

Karabiner Elements doesn’t clash in principle with DefaultKeybinding.dict (I’ve been using them together for years with no problem), but of course it can override individual settings as it seems to be applied later in the process.

Have you tried turning Karabiner Elements off to see if that makes a difference? If so, then it’s a matter of going through each KE modification and disabling them in turn to see which is causing the problem.

HTH.

I just tried this and I’ve come to the conclusion that DefaultKeybinding.dict is not functioning at all.

I say this because the Caps Lock keybinding stops working once Karabiner is turned off. Any suggestions on how to get it to function?

It depends on what you’re binding Caps Lock to, I think.

There are three places I know to alter the default Caps Lock = Caps Lock binding.

  1. System Preferences > Keyboard > Modifier Keys
  2. DefaultKeybinding.dict
  3. Karabiner elements (or similar program like Better Touch Tool).

I’m not totally sure of the order these are applied. Of course 1 only allows a simple swap of Caps Lock → Control for example.

DefaultKeybinding allows you to rebind modifiers and keys to various commands (mostly the text editing navigating commands built into MacOS), but it doesn’t allow you to some of the advanced things that Karabiner Elements does, such as make Caps Lock act as a Hyper key, or to act as Escape when it’s tapped, or as Control when it’s held down (which is how I have it). For that you need one of the advanced programs.

So it really depends on what you’re asking the CapsLock key to do. The only thing I can suggest is that you turn all three methods off and then enable them individually to track which is causing the problem.

HTH.

I had this problem with KE as well. Just installing KE (not even turning it on) broke my Caps Lock. I think it had to do with their uninstall not removing everything, which could be fixed by now, but I just gave up.