mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-14 22:01:23 +00:00
Allow global keyboard shortcuts to override all other shortcuts by providing a special field (#6735)
* allow global keyboard shortcuts to override all other shortcuts by providing a special field * rework the global shortcuts taking priority * replace bool option with options object in KeyboardManager's keydown handler * update keyboard shortcut documentation to add information about the new priority setting * add support for priority global keyboard shortcuts to code mirror * update the feature's docs to point out it was/will be introduced in 5.2.4 * rollback unnecessary change
This commit is contained in:
@@ -7,6 +7,8 @@ A ''Keyboard Shortcut Tiddler'' is made of three parts:
|
||||
* The ''field'' `key` with a [[Keyboard Shortcut Descriptor]] as its ''value''
|
||||
* Actions in its ''text'' field
|
||||
|
||||
<<.tip """<<.from-version "5.2.4">> By default <<.wlink KeyboardWidget>> and text editor shortcuts take priority, which can be circumvented by setting the ''field'' `priority` to `yes`.""">>
|
||||
|
||||
If the [[Keyboard Shortcut Descriptor]] has the form `((my-shortcut))` it's a ''reference'' to a ''configuration Tiddler'' that stores the corresponding [[Keyboard Shortcut|KeyboardShortcuts]]
|
||||
|
||||
In order to make a ''shortcut'' editable through the <<.controlpanel-tab KeyboardShortcuts>> Tab in the $:/ControlPanel it's sufficient to create a tiddler `$:/config/ShortcutInfo/my-shortcut`, where the ''suffix'' is the ''reference'' used for the [[Keyboard Shortcut|KeyboardShortcuts]]
|
||||
|
||||
@@ -66,6 +66,8 @@ In the [[Keyboard Shortcuts Tab|$:/core/ui/ControlPanel/KeyboardShortcuts]] the
|
||||
|
||||
!! Using global Keyboard Shortcuts
|
||||
|
||||
> See [[Keyboard Shortcut Tiddler]] for detailed information about creating new global keyboard shortcuts.
|
||||
|
||||
> The actions for ''global'' keyboard shortcuts are stored in the ''text'' field of tiddlers tagged with <<tag $:/tags/KeyboardShortcut>>
|
||||
|
||||
> The ''key field'' connects an action-tiddler with the corresponding shortcut through the `((my-shortcut))` syntax, called [[Keyboard Shortcut Descriptor]]
|
||||
|
||||
Reference in New Issue
Block a user