本文整理匯總了TypeScript中neuroglancer/util/keyboard_shortcut_handler.KeySequenceMap.bind方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript KeySequenceMap.bind方法的具體用法?TypeScript KeySequenceMap.bind怎麽用?TypeScript KeySequenceMap.bind使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類neuroglancer/util/keyboard_shortcut_handler.KeySequenceMap
的用法示例。
在下文中一共展示了KeySequenceMap.bind方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: makeDefaultKeyBindings
export function makeDefaultKeyBindings(keyMap: KeySequenceMap) {
keyMap.bind('arrowleft', 'x-');
keyMap.bind('arrowright', 'x+');
keyMap.bind('arrowup', 'y-');
keyMap.bind('arrowdown', 'y+');
keyMap.bind('comma', 'z-');
keyMap.bind('period', 'z+');
keyMap.bind('keyz', 'snap');
keyMap.bind('control+equal', 'zoom-in');
keyMap.bind('control+shift+equal', 'zoom-in');
keyMap.bind('control+minus', 'zoom-out');
keyMap.bind('keyr', 'rotate-relative-z-');
keyMap.bind('keye', 'rotate-relative-z+');
keyMap.bind('shift+arrowdown', 'rotate-relative-x-');
keyMap.bind('shift+arrowup', 'rotate-relative-x+');
keyMap.bind('shift+arrowleft', 'rotate-relative-y-');
keyMap.bind('shift+arrowright', 'rotate-relative-y+');
keyMap.bind('keyl', 'recolor');
keyMap.bind('keyx', 'clear-segments');
keyMap.bind('keys', 'toggle-show-slices');
keyMap.bind('keyb', 'toggle-scale-bar');
keyMap.bind('keya', 'toggle-axis-lines');
for (let i = 1; i <= 9; ++i) {
keyMap.bind('digit' + i, 'toggle-layer-' + i);
}
keyMap.bind('keyn', 'add-layer');
keyMap.bind('keyh', 'help');
keyMap.bind('space', 'toggle-layout');
}
示例2: makeExtraKeyBindings
export function makeExtraKeyBindings(keyMap: KeySequenceMap) {
keyMap.bind('keyo', 'navigate-to-origin');
}