mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-18 16:25:13 +00:00
Extend keyboard handling
To cope with the Mac’s “meta” key (ie command/⌘) preparatory to trapping command-S
This commit is contained in:
@@ -41,10 +41,7 @@ KeyboardWidget.prototype.render = function(parent,nextSibling) {
|
||||
domNode.className = classes.join(" ");
|
||||
// Add a keyboard event handler
|
||||
domNode.addEventListener("keydown",function (event) {
|
||||
if(event.keyCode === self.keyInfo.keyCode &&
|
||||
event.shiftKey === self.keyInfo.shiftKey &&
|
||||
event.altKey === self.keyInfo.altKey &&
|
||||
event.ctrlKey === self.keyInfo.ctrlKey) {
|
||||
if($tw.utils.checkKeyDescriptor(event,self.keyInfo)) {
|
||||
self.dispatchMessage(event);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
Reference in New Issue
Block a user