Creating Keyboard Shortcut on the Mac

By Maldalain, 20 December, 2024

Forum
macOS and Mac Apps

Hi
I know how to create custom keyboard shortcuts on a Mac for menu bar items, and I’ve successfully done so in the past. However, I’m unsure how to assign shortcuts to items that are only accessible through the Shortcuts menu rather than the menu bar.

For example, the play-pause item in the menu bar doesn’t have a default keyboard shortcut. Using the System Settings in the Keyboard section, I can easily assign a custom shortcut for it. But when it comes to items that are only available in the Shortcuts menu, I don’t know how to create shortcuts for them.

I’m currently facing this issue with the Speech Central app. Essential navigation and editing commands don’t have built-in keyboard shortcuts and are only accessible through the Shortcuts menu. It would be incredibly helpful if I could assign custom shortcuts to these commands.

Options

Comments

By Changeling on Friday, December 20, 2024 - 13:43

I also do this quite often, and you can only do it for items in the menu bar. I agree with you that this can be frustrating for certain apps.

By Khomus on Friday, December 20, 2024 - 17:43

I have never used it, I plan to, I just haven't gotten round to checking it out yet. But I feel like this is the sort of thing it was meant to solve, or one of them anyway. You have to pay for it but I think there's a free demo/trial, and I think it's a single fee, not a subscription.

https://www.keyboardmaestro.com/

By TheBllindGuy07 on Saturday, December 21, 2024 - 04:43

I have also heard that km might be able to assign shortcuts to the buttons visible on the screen and there are other people who also like to have shortcuts for calculator scientific functions like me... Can anyone confirm this?

By 3AM on Saturday, December 21, 2024 - 05:43

I use and love BetterTouchTool.
It has so many customization options.
Keyboard shortcuts, trackpad gestures, even midi input. It has so many ways to interact with the OS.
It's not free. But it is reasonably priced.
And it is VoiceOver accessible.

https://folivora.ai/

By TheBllindGuy07 on Saturday, December 21, 2024 - 06:43

Midi input!? This is overkill and something I might wanna look at :) .

By Igna Triay on Saturday, December 21, 2024 - 07:43

Could you expand on better touch tool? It sounds interesting. How would midi input work? What else can you do with it?

By Maldalain on Saturday, December 21, 2024 - 10:43

I tried keybaord maestro, while it is doing a good job in assigning the keystrokes, yet VoiceOver seems to override keystrokes when it is on. For example, if I need to assign bookmarking command in the Speech Central app, in the macro script there should be down arrow presses twice, when the quick arrows navigation on the command fails to operate.
So need another solution.
I hate to say this, but the developer did not respond to any of my emails recently.

By TheBllindGuy07 on Saturday, December 21, 2024 - 18:43

For arrow key quick nav it's perfectly normal as when this is on voiceover has priority over everything else when you press arrow keys. Unless I misunderstood you there isn't really a problem here?

By Maldalain on Sunday, December 22, 2024 - 00:43

In the Speech Central app, the command to bookmark certain content is only available in the Shortcuts menu. So to bookmark certain content first you need to activate the shortcuts menu then down arrow twice then return. When this is recorded in the macro script, Keyboard Maestro can not implement the two down arrow presses unless VoiceOver Arrow nav is off. Hope this clears the issue.

By Khomus on Sunday, December 22, 2024 - 02:43

It can't because Voiceover is using the arrows for quick nav. So instead, do your macro as enter menus, VO-tab, down, VO-tab down, enter. That should solve it, even with quick nav on.

The other thing you could do, and I don't know if Keyboard Maestro would pick this up, is VO-down twice. Although I guess if it picks up VO-tab to pass the next keystroke through, it should pick up VO-down as well. To be clear, what I mean is that whether you have quick nav on or not, your macro should be caps lock down twice, not the down arrow by itself.

By Labsii on Sunday, December 22, 2024 - 18:43

I was quite confident that old shortcut Command + D (that is also used for bookmarking in many apps) still works to bookmark something, and after trying I can confirm that it does.

However it is a good remark that it would be better if it was in the main menu as it would be easier to discover it. Unfortunately this requires a fairly complex solution in Apple's more recent technologies used in the app and at the point of launching the new version of the app it was beyond my knowledge to implement that. As I have mastered now most of the very complex solutions, I think I should be able to implement it, so it will be added in the future versions.

But as said, this works properly already so for those that have the chance to be informed regarding the shortcut there will be no difference, the difference is only in discoverability.

By Maldalain on Monday, December 23, 2024 - 00:43

Thanks for your reply. I tried the CMD+D and it did not bookmark anything! Is there a way I can send you a screen recording to confirm this?

By Labsii on Monday, December 23, 2024 - 23:43

After further inspection, I can confirm that the newer versions of macOS have a bug regarding this.

The app cannot know if the button is clicked or activated by keyboard shortcut, so those functions should work the same if the operating system is working properly. I can confirm that most recent versions don't, so if you use keyboard shortcut to bookmark you would bookmark some unexpected paragraph. It is even more puzzling that the button is properly changing the sign/title if the current paragraph is bookmarked or not, so it should be aware which is current paragraph, but when being triggered by the keyboard shortcut it pulls some old value.

I'll see if I can build some simpler test to submit as a bug to Apple (and also to fully confirm that it is this sort of bug).

By Labsii on Tuesday, December 24, 2024 - 00:43

Just to add that I was able to find a sort of workaround, so this should work in the next version.

By Maldalain on Tuesday, December 24, 2024 - 02:43

I greatly appreciate your time and effort responding to users request. Thanks so much for this.