The default keyboard shortcuts for
tiddlywiki<http://tiddlywiki.com/#KeyboardShortcuts>stop working after I added
my own keyboard shortcuts to the plugin code
below:
config.macros.addfeaturesplugin.keyDown = function(dasArgs) {
console.log(dasArgs.keyCode);
if(dasArgs.keyCode == 91) { /* Start menu button */
console.log("startmenu key down");
config.macros.addfeaturesplugin.modifierPressed = true;
}
if(config.macros.addfeaturesplugin.modifierPressed &&
dasArgs.keyCode == 71) { /* g key */
console.log("g key down");
config.macros.addfeaturesplugin.bringUpAndEdit();
config.macros.addfeaturesplugin.modifierPressed = false;
return true;
}
return false;
};
config.macros.addfeaturesplugin.keyUp = function(dasArgs) {
if(dasArgs.charCode == 91) {
config.macros.addfeaturesplugin.modifierPressed = false;
}
};
addEvent(document, "keydown", config.macros.addfeaturesplugin.keyDown);
addEvent(document, "keyup", config.macros.addfeaturesplugin.keyUp);
Is there some other way I should be adding these, so that my keyboard
shortcuts are added from my plugin without destroying the existing ones?
Thank you,
Andrew J. Leer
P.S. How do I donate to Eric from Tiddlywiki?
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/tiddlywiki/-/ObtlpaGdZdcJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en.