mirror of
https://github.com/fluxscape/fluxscape.git
synced 2026-01-10 14:22:53 +01:00
chore: Combine search keybinding definitions
This commit is contained in:
@@ -8,6 +8,7 @@ import { ipcRenderer } from 'electron';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { platform } from '@noodl/platform';
|
||||
|
||||
import { Keybindings } from '@noodl-constants/Keybindings';
|
||||
import { App } from '@noodl-models/app';
|
||||
import { AppRegistry } from '@noodl-models/app_registry';
|
||||
import { CloudService } from '@noodl-models/CloudServices';
|
||||
@@ -156,7 +157,7 @@ export function EditorPage({ route }: EditorPageProps) {
|
||||
useKeyboardCommands(() => [
|
||||
{
|
||||
handler: () => SidebarModel.instance.switch('search'),
|
||||
keybinding: KeyMod.CtrlCmd | KeyCode.KEY_F
|
||||
keybinding: Keybindings.SEARCH.hash
|
||||
},
|
||||
{
|
||||
handler: () => EventDispatcher.instance.emit('viewer-open-devtools'),
|
||||
|
||||
@@ -5,9 +5,9 @@ import { useSidePanelKeyboardCommands } from '@noodl-hooks/useKeyboardCommands';
|
||||
import classNames from 'classnames';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
|
||||
import { Keybindings } from '@noodl-constants/Keybindings';
|
||||
import { ComponentModel } from '@noodl-models/componentmodel';
|
||||
import { NodeGraphNode } from '@noodl-models/nodegraphmodel';
|
||||
import { KeyCode, KeyMod } from '@noodl-utils/keyboard/KeyCode';
|
||||
import { performSearch } from '@noodl-utils/universal-search';
|
||||
|
||||
import { SearchInput } from '@noodl-core-ui/components/inputs/SearchInput';
|
||||
@@ -40,7 +40,7 @@ export function SearchPanel() {
|
||||
inputRef.current.focus();
|
||||
inputRef.current.select();
|
||||
},
|
||||
keybinding: KeyMod.CtrlCmd | KeyCode.KEY_F
|
||||
keybinding: Keybindings.SEARCH.hash
|
||||
}
|
||||
],
|
||||
'search'
|
||||
|
||||
Reference in New Issue
Block a user