diff --git a/keybinding/keybinding.js b/keybinding/keybinding.js index e16ade7..6e3fd1a 100644 --- a/keybinding/keybinding.js +++ b/keybinding/keybinding.js @@ -63,7 +63,7 @@ d3.keybinding = function(namespace) { callback: callback }; - code = code.toLowerCase().match(/(?:(?:[^+])+|\+\+|^\+$)/g); + code = code.toLowerCase().match(/(?:(?:[^+⇧⌃⌥⌘])+|[⇧⌃⌥⌘]|\+\+|^\+$)/g); for (var i = 0; i < code.length; i++) { // Normalise matching errors @@ -139,19 +139,25 @@ d3.keybinding = function(namespace) { // Up Arrow Key, or ↓ '↓': 40, down: 40, 'arrow-down': 40, // odities, printing characters that come out wrong: + // Firefox Equals + 'ffequals': 61, // Num-Multiply, or * '*': 106, star: 106, asterisk: 106, multiply: 106, // Num-Plus or + '+': 107, 'plus': 107, // Num-Subtract, or - '-': 109, subtract: 109, + // Firefox Minus + 'ffplus': 171, + // Firefox Minus + 'ffminus': 173, // Semicolon - ';': 186, semicolon:186, + ';': 186, semicolon: 186, // = or equals '=': 187, 'equals': 187, // Comma, or , ',': 188, comma: 188, - //'-': 189, //??? + 'dash': 189, //??? // Period, or ., or full-stop '.': 190, period: 190, 'full-stop': 190, // Slash, or /, or forward-slash