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