From cc599f3c03d4596a203f681bfd7eedb53bbcbb46 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 8 Nov 2016 12:13:31 +0100 Subject: [PATCH] fix undefined underscore keycode (#3564) --- modules/lib/d3.keybinding.js | 3 ++- modules/ui/zoom.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/lib/d3.keybinding.js b/modules/lib/d3.keybinding.js index cc98ab242..7c9ec918a 100644 --- a/modules/lib/d3.keybinding.js +++ b/modules/lib/d3.keybinding.js @@ -169,7 +169,8 @@ d3keybinding.keyCodes = { '=': 187, 'equals': 187, // Comma, or , ',': 188, comma: 188, - 'dash': 189, //??? + // Dash / Underscore key + 'dash': 189, // Period, or ., or full-stop '.': 190, period: 190, 'full-stop': 190, // Slash, or /, or forward-slash diff --git a/modules/ui/zoom.js b/modules/ui/zoom.js index 685671d93..e8065d581 100644 --- a/modules/ui/zoom.js +++ b/modules/ui/zoom.js @@ -75,7 +75,7 @@ export function uiZoom(context) { keybinding.on([key, '⇧' + key], zoomIn); keybinding.on([uiCmd('⌘' + key), uiCmd('⌘⇧' + key)], zoomInFurther); }); - _.each(['-','ffminus','_','dash'], function(key) { + _.each(['-','ffminus','dash'], function(key) { keybinding.on([key, '⇧' + key], zoomOut); keybinding.on([uiCmd('⌘' + key), uiCmd('⌘⇧' + key)], zoomOutFurther); });