IvanMathy / Boop

A scriptable scratchpad for developers. In slow yet steady progress.
https://boop.okat.best
MIT License
3.84k stars 356 forks source link

[Feat] Ability to Change Activation Key #353

Open gknoblauch opened 2 years ago

gknoblauch commented 2 years ago

Hi! It would be awesome one could customize the activiate key to be something else other than CMD+B.

Other apps use different keys like CMD+P to open up an "Action" pane and I find myself also trying to CMD+P in Boop before finding the CMD+B.

I understand that CMD+B was probably chosen because of the name of the app, but believe it would be a great additional feature for power users who want to change the default!

Thanks!

Joshfindit commented 2 years ago

Apologies since this is an easy check, but I’m not near my computer and will forget by then:

macOS has some built-in functionality around this ( https://support.apple.com/en-ca/guide/mac-help/mchlp2864/12.0/mac/12.0 for example ).

  1. Does Boop already support it and you can change the keyboard shortcut already?
  2. If no: does Boop want to implement that functionality through the built-in API?
gknoblauch commented 2 years ago

@Joshfindit I believe that is only for conflicting system-wide shortcuts.

Not super familiar with how Mac App's differentiate between system-wide shortcuts and in-app shortcuts but Boop doesn't show up in the left nav Shortcuts list.

My understanding is that this needs to be implemented inside the Boop app in a preferences pane.

Below is an example of how CleanShot X does this in a preference pane:

image
Joshfindit commented 2 years ago

Problem is Macs have way too many places for these kinds of things. The Keyboard Shortcuts preference panel is a fairly recent invention designed to unify all the keyboard shortcuts but it doesn’t quite get there.

Your comment about system-wide vs in-app shortcuts: they’re all mixed in together because there are different APIs at work behind the scenes. For example: one of the pre-panel features was the ability to add your own keyboard shortcuts by specifying the shortcut itself and the name of the menu item that it would trigger. You can see that under App Shortcuts.

But I remember there was an official API so that devs could register macOS keyboard shortcuts themselves and have them automatically show up in the correct preference pane which meant not having to build preference windows in to their applications.

I’m not sure if that API is depreciated, but it feels like an excellent fit for Boop.

sindresorhus commented 2 years ago

It's fairly easy to implement customizable keyboard shortcut with my KeyboardShortcuts package.