import { Hotkey , Hotkeys } from '@blueprintjs/core' ; import _ from 'lodash' ; import { ShortcutImplementations } from 'constants/shortcut' ; import { getShortcuts } from 'store/selectors/settings' ; param all param current param global param disabled return export function renderShorcuts ( all , current , global = false , disabled = false ) { return ( < Hotkeys > { _ . map ( current , ( { type , action } ) => { const shortcut = all [ type ] ; if ( _ . isNil ( shortcut . combo ) ) { return null ; } return ( < Hotkey combo = { shortcut . combo } group = { shortcut . group } label = { shortcut . name } disabled = { disabled } onKeyDown = { action } global = { global } preventDefault allowInInput key = { type } / > ) ; } ) } < /Hotkeys>); }