EvidentlyCube / TW5-GoToShortcut

TiddlyWiki5 plugin, adds keyboard shortcut to open a modal where you can quickly and easily find and go to a tiddler
Other
1 stars 0 forks source link

Why not use ctrl+p to open search? #2

Closed linonetwo closed 1 year ago

linonetwo commented 1 year ago

Or I think we can share a similar tm-message to open the command palette, like open-command-palette

key: ((open-command-palette))
tags: $:/tags/KeyboardShortcut
title: $:/core/ui/KeyboardShortcuts/CommandPalette
type: text/vnd.tiddlywiki

<$action-sendmessage $message="open-command-palette"/>
linonetwo commented 1 year ago

To increase Interoperability

EvidentlyCube commented 1 year ago

Supporting a message is a nice idea, I'll add it to my roadmap notes.

Other than that the keyboard shortcut is customizable in Control Panel -> Keyboard Shortcut -> EC-GoToModal. Just checked that it works in the latest version.

Ctrl+P would overwrite the native browser's print shortcut which isn't very user friendly so I'm against changing the default.

I am closing this as the keyboard shortcut customization is possible.

linonetwo commented 1 year ago

Ok, just because my TidGi have a native button to trigger command palette using message, so I suggest we use the same message so user can switch between command palette solutions freely.

EvidentlyCube commented 1 year ago

I'd rather not use the same widget message in case someone wants to use both solution simultaneously for some reason.

But how about this: if I add a support for reacting to messages I'll make it such that there is an option (disabled by default) to also react to command palette's message?

linonetwo commented 1 year ago

Though I don't think someone will install two command palette, but what you supposed is ok.

linonetwo commented 1 year ago

These plugins should be replacements for each other. I may create another plugin using https://github.com/pacocoursey/cmdk , it will be larger (requires ReactJS plugin) but being more powerful.

EvidentlyCube commented 1 year ago

Though I don't think someone will install two command palette,

It is unlikely but I also learned the hard way many times in my career that users come up with scenarios the developer can't imagine. I'd rather stay flexible.