autodetect platform in HashHandler
This commit is contained in:
parent
841dbf7890
commit
d92505e1c9
2 changed files with 3 additions and 2 deletions
|
|
@ -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 = {};
|
||||
|
||||
|
|
|
|||
|
|
@ -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 : {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue