atom-keymap
Advanced tools
Comparing version 0.6.0 to 0.7.0
(function() { | ||
var CommandEvent, Emitter, File, KeyBinding, Keymap, OtherPlatforms, Platforms, fs, isAtomModifier, keydownEvent, keystrokeForKeyboardEvent, path, season, _ref, | ||
var CSON, CommandEvent, Emitter, File, KeyBinding, Keymap, OtherPlatforms, Platforms, fs, isAtomModifier, keydownEvent, keystrokeForKeyboardEvent, path, _ref, | ||
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; | ||
season = require('season'); | ||
CSON = require('season'); | ||
@@ -36,2 +36,4 @@ fs = require('fs-plus'); | ||
Keymap.prototype.defaultTarget = null; | ||
Keymap.prototype.pendingPartialMatches = null; | ||
@@ -42,3 +44,10 @@ | ||
function Keymap(options) { | ||
this.defaultTarget = options != null ? options.defaultTarget : void 0; | ||
var key, value; | ||
if (options == null) { | ||
options = {}; | ||
} | ||
for (key in options) { | ||
value = options[key]; | ||
this[key] = value; | ||
} | ||
this.keyBindings = []; | ||
@@ -220,3 +229,3 @@ this.queuedKeyboardEvents = []; | ||
try { | ||
return season.readFileSync(filePath); | ||
return CSON.readFileSync(filePath); | ||
} catch (_error) { | ||
@@ -228,3 +237,3 @@ error = _error; | ||
} else { | ||
return season.readFileSync(filePath); | ||
return CSON.readFileSync(filePath); | ||
} | ||
@@ -231,0 +240,0 @@ }; |
{ | ||
"name": "atom-keymap", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Atom's DOM-aware keymap module", | ||
@@ -5,0 +5,0 @@ "main": "./lib/keymap", |
35878
945