mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Add modifier variable to linkcatcher actionstring (#4758)
* Add modifier variable to linkcatcher actionstring * Update LinkCatcherWidget.tid
This commit is contained in:
parent
484c9e986f
commit
95e30138f0
@ -87,7 +87,8 @@ LinkCatcherWidget.prototype.handleNavigateEvent = function(event) {
|
|||||||
}
|
}
|
||||||
if(this.catchActions) {
|
if(this.catchActions) {
|
||||||
this.executingActions = true;
|
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;
|
this.executingActions = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -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 |
|
|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 |
|
|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 |
|
|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'' |
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user