Fix Redo via Cmd-Shift-Z in notes on OS X
This commit is contained in:
parent
8d807b73c6
commit
5913e6780e
1 changed files with 20 additions and 0 deletions
|
@ -125,6 +125,18 @@
|
|||
this._eventHandler = function (event) {
|
||||
//Zotero.debug(event.type);
|
||||
switch (event.type) {
|
||||
case 'keydown':
|
||||
// Intercept and manually trigger redo for Cmd-Shift-Z,
|
||||
// which keeps it from toggling the Zotero pane instead
|
||||
if (Zotero.isMac && event.metaKey && event.shiftKey && !event.ctrlKey
|
||||
&& !event.altKey && event.keyCode == 90) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
self.redo();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'keypress':
|
||||
// Ignore keypresses that don't change
|
||||
// any text
|
||||
|
@ -336,6 +348,14 @@
|
|||
</body>
|
||||
</method>
|
||||
|
||||
<method name="redo">
|
||||
<body>
|
||||
<![CDATA[
|
||||
this._editor.undoManager.redo();
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="clearUndo">
|
||||
<body>
|
||||
<![CDATA[
|
||||
|
|
Loading…
Add table
Reference in a new issue