Is It Possible to Change KM’S Default Keyboard Shortcuts?

Is there a way to change or disable keyboard shortcuts in KM?

The problem

I created a custom HTML prompt and I'm wanting to use some keyboard shortcuts in there that are also default keyboard shortcuts in Keyboard Maestro. The shortcuts still work in the prompt and everything behaves properly, but since the KM engine is trying to use them, too, I get a system "error" sound even though the KM Editor is not open (at least that's the only thing I can figure).

Note: When trying to find other shortcuts, I'm finding all the common ones are already taken by KM, so I'm having to replace my very basic K with a much more complex keyboard shortcut.

Possible solutions

  1. (Much preferred) When the custom prompt is open, disable default editor keyboard shortcuts in KM. ( K opens the actions palette—which I don't need in the middle of running a macro). I realize that would likely require some dev time, @peternlewis, but it would be amazing if that’s a relatively quick change.
  2. Change default shortcuts in KM so I can use what I want in my custom prompt. (Trouble is, I like K normally … so I’d rather not resort to this).

Thanks for any help you can give!

File under "Don’t develop with your sound muted."

I don’t really follow you.

Command-K, in the Keyboard Maestro editor, is menu shortcut. You could change it with the System Preferences.

Keyboard Maestro (editor) does not do anything specifically to support this. When you press it, the system checks the menu bar to handle it and if it finds an enabled menu item, then that menu item is selected. Otherwise the system beeps.

If you have a Custom HTML Prompt window open, and it has focus, then the key will go to it. If it handles it, then that will be the end of it. If not, the system will try to handle it, and likely fail and then beep.

Keyboard Maestro (editor) cannot “disable default editor keyboard shortcuts” when the Custom HTML Prompt has focus - the menus are already disabled. Removing the command key from the menu (even if that made any sense at all) would do nothing, the system would still try to perform the Command-K and still beep, because the menu does not exist/is disabled already if the Custom HTML Prompt has focus.

So I'm confused as to what your issue is - if you handle the Command-K in the Custom HTML Prompt, and assuming it has focus, then you should not get any beep. If you don’t handle it, and the Custom HTML Prompt has focus, then the system will beep because a key is pressed which is not handled. The Keyboard Maestro editor has nothing to do with this.

1 Like

Welp, I'm an idiot :slight_smile:

Thanks for your patient and lengthy response, Peter.

I just forgot to prevent the default … I can't tell you how long I spent trying to nail down the problem. It was the only keyboard shortcut throwing an error sound and every test somehow showed it was KM. (Although I didn't mean to be as settled in that conclusion as my post now reads.)

Also, thanks for such an amazing tool as Keyboard Maestro! I was able to create this custom fetch for support articles to quickly access any article in our support center. We’ll use it while writing support articles and videos to quickly access existing content. This little popover keyboard shortcut palette shows the different options I've built in (I can even use … custom keyboard shortcuts :man_facepalming:). I can't even tell you how much time this will save my team and how much fun it was to build … all thanks to KM. A couple hours of coding in normal web languages. Can't thank you enough!