Omit new default hotkeys if a hotkey is already in use

Use case or problem

A quite recent version release 0.12.16 added a new command Undo close pane with a default hotkey Ctrl/Cmd + Shift + T. The feature is welcome, and so is a hotkey in case the hotkey happens not to be in use already.

The problem is that I happen to have multiple vaults that use Ctrl/Cmd + Shift + T hotkey for something completely different. When I try to hit Ctrl/Cmd + Shift + T, the command I mean to launch does not launch, because Undo close pane “steals” the hotkey :slightly_smiling_face: . A good thing is that Undo close pane does not do anything dramatic.

Proposed solution

I’d suggest that when a new version is installed and a vault is opened the first time after the upgrade, make the following checks:

  1. Check did the upgrade bring any new default hotkeys? If not, stop here, nothing needs to be done.
  2. Scan through all those new default hotkeys and check does the vault’s hotkeys.json file use the same hotkeys for something else?
  3. If the vault already uses that hotkey, add the following kind of record to hotkeys.json:
    "workspace:undo-close-pane": []
    
    This will disable the newly added default hotkey for the current vault, because it assigns an empty list of hotkeys to it.

Current workaround (optional)

I need to go to hotkey settings in all of my vaults (that use Ctrl/Cmd + Shift + T for my own thing), and find Undo close pane from the list and then remove Ctrl/Cmd + Shift + T from it.

Thank you for your support! :sunglasses:

1 Like

+1 for this FR!

The proposed solution is great!

1 Like