autodetect platform in HashHandler

This commit is contained in:
nightwing 2013-03-17 15:25:05 +04:00
commit d92505e1c9
2 changed files with 3 additions and 2 deletions

View file

@ -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 = {};

View file

@ -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 : {