diff options
-rw-r--r-- | lib/scripts/hotkeys.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/scripts/hotkeys.js b/lib/scripts/hotkeys.js index 2b6fb6d96..c340c7f02 100644 --- a/lib/scripts/hotkeys.js +++ b/lib/scripts/hotkeys.js @@ -1,6 +1,6 @@ /** * Some of these scripts were taken from TinyMCE (http://tinymce.moxiecode.com/) and were modified for DokuWiki - * + * * Class handles accesskeys using javascript and also provides ability * to register and use other hotkeys as well. * @@ -17,6 +17,8 @@ function Hotkeys() { * this.modifier = 'ctrl+alt+shift'; * this.modifier = 'alt'; * this.modifier = 'alt+shift'; + * + * overwritten in intitialize (see below) */ this.modifier = 'ctrl+alt'; @@ -34,6 +36,14 @@ function Hotkeys() { */ this.initialize = function() { var t = this; + + //switch modifier key based on OS FS#1958 + if(is_macos){ + t.modifier = 'ctrl+alt'; + }else{ + t.modifier = 'alt'; + } + /** * Lookup all anchors with accesskey and register event - go to anchor * target. @@ -97,7 +107,7 @@ function Hotkeys() { * * @param e KeyboardEvent * @author Marek Sacha <sachamar@fel.cvut.cz> - * @return b boolean + * @return b boolean */ this.onkeyup = function(e) { var t = this; |