1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-25 12:47:40 +00:00

Add modifier variable to button actionstring (#4671)

* Add modifier variable to button actionstring

* Update ButtonWidget.tid

* Update droppable.js

* Create getEventModifierKeyDescriptor method in keyboard.js

* Update droppable.js

* Update button.js
This commit is contained in:
Simon Huber
2020-07-14 18:04:06 +02:00
committed by GitHub
parent a0bd93c596
commit 00ff0d6fa0
4 changed files with 14 additions and 4 deletions

View File

@@ -132,8 +132,7 @@ DroppableWidget.prototype.handleDropEvent = function(event) {
DroppableWidget.prototype.performActions = function(title,event) {
if(this.droppableActions) {
var modifierKey = event.ctrlKey && ! event.shiftKey ? "ctrl" : event.shiftKey && !event.ctrlKey ? "shift" :
event.ctrlKey && event.shiftKey ? "ctrl-shift" : "normal" ;
var modifierKey = $tw.keyboardManager.getEventModifierKeyDescriptor(event);
this.invokeActionString(this.droppableActions,this,event,{actionTiddler: title, modifier: modifierKey});
}
};