mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-03 19:18:20 +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:
@@ -186,6 +186,10 @@ function CodeMirrorEngine(options) {
|
||||
return false;
|
||||
});
|
||||
this.cm.on("keydown",function(cm,event) {
|
||||
if ($tw.keyboardManager.handleKeydownEvent(event, {onlyPriority: true})) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return self.widget.handleKeydownEvent.call(self.widget,event);
|
||||
});
|
||||
this.cm.on("focus",function(cm,event) {
|
||||
|
||||
Reference in New Issue
Block a user