diff --git a/lib/ace/keyboard/hash_handler.js b/lib/ace/keyboard/hash_handler.js index fc323837..2ef110da 100644 --- a/lib/ace/keyboard/hash_handler.js +++ b/lib/ace/keyboard/hash_handler.js @@ -32,9 +32,10 @@ define(function(require, exports, module) { "use strict"; var keyUtil = require("../lib/keys"); +var useragent = require("../lib/useragent"); function HashHandler(config, platform) { - this.platform = platform; + this.platform = platform || (useragent.isMac ? "mac" : "win"); this.commands = {}; this.commmandKeyBinding = {}; diff --git a/lib/ace/lib/keys.js b/lib/ace/lib/keys.js index 9743ef88..77399242 100644 --- a/lib/ace/lib/keys.js +++ b/lib/ace/lib/keys.js @@ -47,7 +47,7 @@ var Keys = (function() { KEY_MODS: { "ctrl": 1, "alt": 2, "option" : 2, - "shift": 4, "meta": 8, "command": 8 + "shift": 4, "meta": 8, "command": 8, "cmd": 8 }, FUNCTION_KEYS : {