1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Add modifier variable to linkcatcher actionstring (#4758)

* Add modifier variable to linkcatcher actionstring

* Update LinkCatcherWidget.tid
This commit is contained in:
Simon Huber 2020-07-15 13:27:14 +02:00 committed by GitHub
parent 484c9e986f
commit 95e30138f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -87,7 +87,8 @@ LinkCatcherWidget.prototype.handleNavigateEvent = function(event) {
}
if(this.catchActions) {
this.executingActions = true;
this.invokeActionString(this.catchActions,this,event,{navigateTo: event.navigateTo});
var modifierKey = $tw.keyboardManager.getEventModifierKeyDescriptor(event);
this.invokeActionString(this.catchActions,this,event,{navigateTo: event.navigateTo, modifier: modifierKey});
this.executingActions = false;
}
} else {

View File

@ -23,5 +23,5 @@ The content of the `<$linkcatcher>` widget is displayed normally.
|message |Optional identifier for a [[widget message|Messages]] to be sent when a navigation is caught |
|set |Optional title of the tiddler to be set to a specified value when navigation occurs |
|setTo |Value to be assigned by the `set` attribute |
|actions |Actions to be performed when a link is caught. Within the action string, the variable "navigateTo" contains the title of the tiddler being navigated |
|actions |Actions to be performed when a link is caught. Within the action string, the variable "navigateTo" contains the title of the tiddler being navigated. <<.from-version "5.1.23">> the <<.def "modifier">> variable lists the modifier keys that are pressed when the action is invoked. The possible modifiers are ''ctrl'', ''ctrl-alt'', ''ctrl-shift'', ''alt'', ''alt-shift'', ''shift'' and ''ctrl-alt-shift'' |