diff --git a/modules/ui/init.js b/modules/ui/init.js index 29d4defaa..0ec03e0d7 100644 --- a/modules/ui/init.js +++ b/modules/ui/init.js @@ -1,3 +1,5 @@ +import _uniq from 'lodash-es/uniq'; + import { event as d3_event, select as d3_select @@ -298,9 +300,10 @@ export function uiInit(context) { var panPixels = 80; + var sidebarKeys = _uniq([t('sidebar.key'), '`', '²']); // #5663 context.keybinding() .on('⌫', function() { d3_event.preventDefault(); }) - .on(t('sidebar.key'), ui.sidebar.toggle) + .on(sidebarKeys, ui.sidebar.toggle) .on('←', pan([panPixels, 0])) .on('↑', pan([0, panPixels])) .on('→', pan([-panPixels, 0])) diff --git a/modules/ui/shortcuts.js b/modules/ui/shortcuts.js index 43ee2b0b5..99c31e9bd 100644 --- a/modules/ui/shortcuts.js +++ b/modules/ui/shortcuts.js @@ -1,3 +1,5 @@ +import _uniq from 'lodash-es/uniq'; + import { select as d3_select, selectAll as d3_selectAll @@ -177,6 +179,8 @@ export function uiShortcuts(context) { arr = ['Y']; } else if (detected.os !== 'mac' && d.text === 'shortcuts.browsing.display_options.fullscreen') { arr = ['F11']; + } else if (d.text === 'shortcuts.browsing.display_options.sidebar') { + arr = _uniq([t('sidebar.key'), '`', '²']); // #5663 } return arr.map(function(s) {