diff --git a/src/main/services/SelectionService.ts b/src/main/services/SelectionService.ts
index 49ed189055..0719c2b26b 100644
--- a/src/main/services/SelectionService.ts
+++ b/src/main/services/SelectionService.ts
@@ -40,7 +40,8 @@ type RelativeOrientation =
enum TriggerMode {
Selected = 'selected',
- Ctrlkey = 'ctrlkey'
+ Ctrlkey = 'ctrlkey',
+ Shortcut = 'shortcut'
}
/** SelectionService is a singleton class that manages the selection hook and the toolbar window
@@ -315,6 +316,8 @@ export class SelectionService {
this.toolbarWindow.close()
this.toolbarWindow = null
}
+ this.closePreloadedActionWindows()
+
this.started = false
this.logInfo('SelectionService Stopped')
return true
@@ -349,6 +352,7 @@ export class SelectionService {
//sync the new enabled state to all renderer windows
storeSyncService.syncToRenderer('selectionStore/setSelectionEnabled', newEnabled)
}
+
/**
* Create and configure the toolbar window
* Sets up window properties, event handlers, and loads the toolbar UI
@@ -393,6 +397,9 @@ export class SelectionService {
// Clean up when closed
this.toolbarWindow.on('closed', () => {
+ if (!this.toolbarWindow?.isDestroyed()) {
+ this.toolbarWindow?.destroy()
+ }
this.toolbarWindow = null
})
@@ -578,6 +585,21 @@ export class SelectionService {
return startTop.y === endTop.y && startBottom.y === endBottom.y
}
+ /**
+ * Get the user selected text and process it (trigger by shortcut)
+ *
+ * it's a public method used by shortcut service
+ */
+ public processSelectTextByShortcut(): void {
+ if (!this.selectionHook || this.triggerMode !== TriggerMode.Shortcut) return
+
+ const selectionData = this.selectionHook.getCurrentSelection()
+
+ if (selectionData) {
+ this.processTextSelection(selectionData)
+ }
+ }
+
/**
* Determine if the text selection should be processed by filter mode&list
* @param selectionData Text selection information and coordinates
@@ -869,7 +891,6 @@ export class SelectionService {
this.lastCtrlkeyDownTime = -1
const selectionData = this.selectionHook!.getCurrentSelection()
-
if (selectionData) {
this.processTextSelection(selectionData)
}
@@ -973,6 +994,17 @@ export class SelectionService {
}
}
+ /**
+ * Close all preloaded action windows
+ */
+ private closePreloadedActionWindows() {
+ for (const actionWindow of this.preloadedActionWindows) {
+ if (!actionWindow.isDestroyed()) {
+ actionWindow.destroy()
+ }
+ }
+ }
+
/**
* Preload a new action window asynchronously
* This method is called after popping a window to ensure we always have windows ready
@@ -1121,24 +1153,38 @@ export class SelectionService {
* Manages appropriate event listeners for each mode
*/
private processTriggerMode() {
- if (this.triggerMode === TriggerMode.Selected) {
- if (this.isCtrlkeyListenerActive) {
- this.selectionHook!.off('key-down', this.handleKeyDownCtrlkeyMode)
- this.selectionHook!.off('key-up', this.handleKeyUpCtrlkeyMode)
+ switch (this.triggerMode) {
+ case TriggerMode.Selected:
+ if (this.isCtrlkeyListenerActive) {
+ this.selectionHook!.off('key-down', this.handleKeyDownCtrlkeyMode)
+ this.selectionHook!.off('key-up', this.handleKeyUpCtrlkeyMode)
- this.isCtrlkeyListenerActive = false
- }
+ this.isCtrlkeyListenerActive = false
+ }
- this.selectionHook!.setSelectionPassiveMode(false)
- } else if (this.triggerMode === TriggerMode.Ctrlkey) {
- if (!this.isCtrlkeyListenerActive) {
- this.selectionHook!.on('key-down', this.handleKeyDownCtrlkeyMode)
- this.selectionHook!.on('key-up', this.handleKeyUpCtrlkeyMode)
+ this.selectionHook!.setSelectionPassiveMode(false)
+ break
+ case TriggerMode.Ctrlkey:
+ if (!this.isCtrlkeyListenerActive) {
+ this.selectionHook!.on('key-down', this.handleKeyDownCtrlkeyMode)
+ this.selectionHook!.on('key-up', this.handleKeyUpCtrlkeyMode)
- this.isCtrlkeyListenerActive = true
- }
+ this.isCtrlkeyListenerActive = true
+ }
- this.selectionHook!.setSelectionPassiveMode(true)
+ this.selectionHook!.setSelectionPassiveMode(true)
+ break
+ case TriggerMode.Shortcut:
+ //remove the ctrlkey listener, don't need any key listener for shortcut mode
+ if (this.isCtrlkeyListenerActive) {
+ this.selectionHook!.off('key-down', this.handleKeyDownCtrlkeyMode)
+ this.selectionHook!.off('key-up', this.handleKeyUpCtrlkeyMode)
+
+ this.isCtrlkeyListenerActive = false
+ }
+
+ this.selectionHook!.setSelectionPassiveMode(true)
+ break
}
}
diff --git a/src/main/services/ShortcutService.ts b/src/main/services/ShortcutService.ts
index 0bf696d4bf..24ea2324fd 100644
--- a/src/main/services/ShortcutService.ts
+++ b/src/main/services/ShortcutService.ts
@@ -10,6 +10,7 @@ import { windowService } from './WindowService'
let showAppAccelerator: string | null = null
let showMiniWindowAccelerator: string | null = null
let selectionAssistantToggleAccelerator: string | null = null
+let selectionAssistantSelectTextAccelerator: string | null = null
//indicate if the shortcuts are registered on app boot time
let isRegisterOnBoot = true
@@ -39,6 +40,12 @@ function getShortcutHandler(shortcut: Shortcut) {
selectionService.toggleEnabled()
}
}
+ case 'selection_assistant_select_text':
+ return () => {
+ if (selectionService) {
+ selectionService.processSelectTextByShortcut()
+ }
+ }
default:
return null
}
@@ -48,9 +55,8 @@ function formatShortcutKey(shortcut: string[]): string {
return shortcut.join('+')
}
-const convertShortcutRecordedByKeyboardEventKeyValueToElectronGlobalShortcutFormat = (
- shortcut: string | string[]
-): string => {
+// convert the shortcut recorded by keyboard event key value to electron global shortcut format
+const convertShortcutFormat = (shortcut: string | string[]): string => {
const accelerator = (() => {
if (Array.isArray(shortcut)) {
return shortcut
@@ -140,7 +146,9 @@ export function registerShortcuts(window: BrowserWindow) {
// only register universal shortcuts when needed
if (
onlyUniversalShortcuts &&
- !['show_app', 'mini_window', 'selection_assistant_toggle'].includes(shortcut.key)
+ !['show_app', 'mini_window', 'selection_assistant_toggle', 'selection_assistant_select_text'].includes(
+ shortcut.key
+ )
) {
return
}
@@ -167,6 +175,10 @@ export function registerShortcuts(window: BrowserWindow) {
selectionAssistantToggleAccelerator = formatShortcutKey(shortcut.shortcut)
break
+ case 'selection_assistant_select_text':
+ selectionAssistantSelectTextAccelerator = formatShortcutKey(shortcut.shortcut)
+ break
+
//the following ZOOMs will register shortcuts seperately, so will return
case 'zoom_in':
globalShortcut.register('CommandOrControl+=', () => handler(window))
@@ -183,9 +195,7 @@ export function registerShortcuts(window: BrowserWindow) {
return
}
- const accelerator = convertShortcutRecordedByKeyboardEventKeyValueToElectronGlobalShortcutFormat(
- shortcut.shortcut
- )
+ const accelerator = convertShortcutFormat(shortcut.shortcut)
globalShortcut.register(accelerator, () => handler(window))
} catch (error) {
@@ -202,23 +212,25 @@ export function registerShortcuts(window: BrowserWindow) {
if (showAppAccelerator) {
const handler = getShortcutHandler({ key: 'show_app' } as Shortcut)
- const accelerator =
- convertShortcutRecordedByKeyboardEventKeyValueToElectronGlobalShortcutFormat(showAppAccelerator)
+ const accelerator = convertShortcutFormat(showAppAccelerator)
handler && globalShortcut.register(accelerator, () => handler(window))
}
if (showMiniWindowAccelerator) {
const handler = getShortcutHandler({ key: 'mini_window' } as Shortcut)
- const accelerator =
- convertShortcutRecordedByKeyboardEventKeyValueToElectronGlobalShortcutFormat(showMiniWindowAccelerator)
+ const accelerator = convertShortcutFormat(showMiniWindowAccelerator)
handler && globalShortcut.register(accelerator, () => handler(window))
}
if (selectionAssistantToggleAccelerator) {
const handler = getShortcutHandler({ key: 'selection_assistant_toggle' } as Shortcut)
- const accelerator = convertShortcutRecordedByKeyboardEventKeyValueToElectronGlobalShortcutFormat(
- selectionAssistantToggleAccelerator
- )
+ const accelerator = convertShortcutFormat(selectionAssistantToggleAccelerator)
+ handler && globalShortcut.register(accelerator, () => handler(window))
+ }
+
+ if (selectionAssistantSelectTextAccelerator) {
+ const handler = getShortcutHandler({ key: 'selection_assistant_select_text' } as Shortcut)
+ const accelerator = convertShortcutFormat(selectionAssistantSelectTextAccelerator)
handler && globalShortcut.register(accelerator, () => handler(window))
}
} catch (error) {
@@ -247,6 +259,7 @@ export function unregisterAllShortcuts() {
showAppAccelerator = null
showMiniWindowAccelerator = null
selectionAssistantToggleAccelerator = null
+ selectionAssistantSelectTextAccelerator = null
windowOnHandlers.forEach((handlers, window) => {
window.off('focus', handlers.onFocusHandler)
window.off('blur', handlers.onBlurHandler)
diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json
index db89a43897..1444fdc98e 100644
--- a/src/renderer/src/i18n/locales/en-us.json
+++ b/src/renderer/src/i18n/locales/en-us.json
@@ -1703,6 +1703,7 @@
"key": "Key",
"mini_window": "Quick Assistant",
"selection_assistant_toggle": "Toggle Selection Assistant",
+ "selection_assistant_select_text": "Selection Assistant: Select Text",
"new_topic": "New Topic",
"press_shortcut": "Press Shortcut",
"reset_defaults": "Reset Defaults",
@@ -1919,10 +1920,15 @@
"title": "Toolbar",
"trigger_mode": {
"title": "Trigger Mode",
- "description": "Show toolbar immediately when text is selected, or show only when Ctrl key is held after selection.",
- "description_note": "The Ctrl key may not work in some apps. If you use AHK or other tools to remap the Ctrl key, it may not work.",
+ "description": "The way to trigger the selection assistant and show the toolbar",
+ "description_note": "Some applications do not support selecting text with the Ctrl key. If you have remapped the Ctrl key using tools like AHK, it may cause some applications to fail to select text.",
"selected": "Selection",
- "ctrlkey": "Ctrl Key"
+ "selected_note": "Show toolbar immediately when text is selected",
+ "ctrlkey": "Ctrl Key",
+ "ctrlkey_note": "After selection, hold down the Ctrl key to show the toolbar",
+ "shortcut": "Shortcut",
+ "shortcut_note": "After selection, use shortcut to show the toolbar. Please set the shortcut in the shortcut settings page and enable it. ",
+ "shortcut_link": "Go to Shortcut Settings"
},
"compact_mode": {
"title": "Compact Mode",
diff --git a/src/renderer/src/i18n/locales/ja-jp.json b/src/renderer/src/i18n/locales/ja-jp.json
index 976a0c93df..70b938e67e 100644
--- a/src/renderer/src/i18n/locales/ja-jp.json
+++ b/src/renderer/src/i18n/locales/ja-jp.json
@@ -1691,6 +1691,7 @@
"key": "キー",
"mini_window": "クイックアシスタント",
"selection_assistant_toggle": "選択アシスタントを切り替え",
+ "selection_assistant_select_text": "選択アシスタント:テキストを選択",
"new_topic": "新しいトピック",
"press_shortcut": "ショートカットを押す",
"reset_defaults": "デフォルトのショートカットをリセット",
@@ -1918,11 +1919,16 @@
"toolbar": {
"title": "ツールバー",
"trigger_mode": {
- "title": "表示方法",
- "description": "テキスト選択時に即時表示、またはCtrlキー押下時のみ表示",
- "description_note": "一部のアプリはCtrlキーでのテキスト選択に対応していません。AHKなどでCtrlキーをリマップすると、選択できなくなる場合があります。",
+ "title": "単語の取り出し方",
+ "description": "テキスト選択後、取詞ツールバーを表示する方法",
+ "description_note": "一部のアプリケーションでは、Ctrl キーでテキストを選択できません。AHK などのツールを使用して Ctrl キーを再マップした場合、一部のアプリケーションでテキスト選択が失敗する可能性があります。",
"selected": "選択時",
- "ctrlkey": "Ctrlキー"
+ "selected_note": "テキスト選択時に即時表示",
+ "ctrlkey": "Ctrlキー",
+ "ctrlkey_note": "テキスト選択後、Ctrlキーを押下して表示",
+ "shortcut": "ショートカットキー",
+ "shortcut_note": "テキスト選択後、ショートカットキーを押下して表示。ショートカットキーを設定するには、ショートカット設定ページで有効にしてください。",
+ "shortcut_link": "ショートカット設定ページに移動"
},
"compact_mode": {
"title": "コンパクトモード",
diff --git a/src/renderer/src/i18n/locales/ru-ru.json b/src/renderer/src/i18n/locales/ru-ru.json
index 67dea44164..fc63d19cfb 100644
--- a/src/renderer/src/i18n/locales/ru-ru.json
+++ b/src/renderer/src/i18n/locales/ru-ru.json
@@ -1691,6 +1691,7 @@
"key": "Клавиша",
"mini_window": "Быстрый помощник",
"selection_assistant_toggle": "Переключить помощник выделения",
+ "selection_assistant_select_text": "Помощник выделения: выделить текст",
"new_topic": "Новый топик",
"press_shortcut": "Нажмите сочетание клавиш",
"reset_defaults": "Сбросить настройки по умолчанию",
@@ -1919,10 +1920,15 @@
"title": "Панель инструментов",
"trigger_mode": {
"title": "Режим активации",
- "description": "Показывать панель сразу при выделении или только при удержании Ctrl.",
+ "description": "Показывать панель сразу при выделении, или только при удержании Ctrl, или только при нажатии на сочетание клавиш",
"description_note": "В некоторых приложениях Ctrl может не работать. Если вы используете AHK или другие инструменты для переназначения Ctrl, это может привести к тому, что некоторые приложения не смогут выделить текст.",
"selected": "При выделении",
- "ctrlkey": "По Ctrl"
+ "selected_note": "После выделения",
+ "ctrlkey": "По Ctrl",
+ "ctrlkey_note": "После выделения, удерживайте Ctrl для показа панели. Пожалуйста, установите Ctrl в настройках клавиатуры и активируйте его.",
+ "shortcut": "По сочетанию клавиш",
+ "shortcut_note": "После выделения, используйте сочетание клавиш для показа панели. Пожалуйста, установите сочетание клавиш в настройках клавиатуры и активируйте его.",
+ "shortcut_link": "Перейти к настройкам клавиатуры"
},
"compact_mode": {
"title": "Компактный режим",
diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json
index 05cd8b80f7..612f2e5e33 100644
--- a/src/renderer/src/i18n/locales/zh-cn.json
+++ b/src/renderer/src/i18n/locales/zh-cn.json
@@ -1703,6 +1703,7 @@
"key": "按键",
"mini_window": "快捷助手",
"selection_assistant_toggle": "开关划词助手",
+ "selection_assistant_select_text": "划词助手:取词",
"new_topic": "新建话题",
"press_shortcut": "按下快捷键",
"reset_defaults": "重置默认快捷键",
@@ -1918,11 +1919,16 @@
"toolbar": {
"title": "工具栏",
"trigger_mode": {
- "title": "触发方式",
- "description": "划词立即显示工具栏,或者划词后按住 Ctrl 键才显示工具栏。",
+ "title": "取词方式",
+ "description": "划词后,触发取词并显示工具栏的方式",
"description_note": "少数应用不支持通过 Ctrl 键划词。若使用了AHK等工具对 Ctrl 键进行了重映射,可能导致部分应用无法划词。",
"selected": "划词",
- "ctrlkey": "Ctrl 键"
+ "selected_note": "划词后立即显示工具栏",
+ "ctrlkey": "Ctrl 键",
+ "ctrlkey_note": "划词后,再 按住 Ctrl键,才显示工具栏",
+ "shortcut": "快捷键",
+ "shortcut_note": "划词后,使用快捷键显示工具栏。请在快捷键设置页面中设置取词快捷键并启用。",
+ "shortcut_link": "前往快捷键设置"
},
"compact_mode": {
"title": "紧凑模式",
diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json
index 315dd20ddd..5766110330 100644
--- a/src/renderer/src/i18n/locales/zh-tw.json
+++ b/src/renderer/src/i18n/locales/zh-tw.json
@@ -1693,6 +1693,7 @@
"key": "按鍵",
"mini_window": "快捷助手",
"selection_assistant_toggle": "開關劃詞助手",
+ "selection_assistant_select_text": "劃詞助手:取词",
"new_topic": "新增話題",
"press_shortcut": "按下快捷鍵",
"reset_defaults": "重設預設快捷鍵",
@@ -1918,11 +1919,16 @@
"toolbar": {
"title": "工具列",
"trigger_mode": {
- "title": "觸發方式",
- "description": "劃詞立即顯示工具列,或者劃詞後按住 Ctrl 鍵才顯示工具列。",
+ "title": "取詞方式",
+ "description": "劃詞後,觸發取詞並顯示工具列的方式",
"description_note": "在某些應用中可能無法透過 Ctrl 鍵劃詞。若使用了AHK等工具對Ctrl鍵進行了重新對應,可能導致部分應用程式無法劃詞。",
"selected": "劃詞",
- "ctrlkey": "Ctrl 鍵"
+ "selected_note": "劃詞後,立即顯示工具列",
+ "ctrlkey": "Ctrl 鍵",
+ "ctrlkey_note": "劃詞後,再 按住 Ctrl鍵,才顯示工具列",
+ "shortcut": "快捷鍵",
+ "shortcut_note": "劃詞後,使用快捷鍵顯示工具列。請在快捷鍵設定頁面中設置取詞快捷鍵並啟用。",
+ "shortcut_link": "前往快捷鍵設定"
},
"compact_mode": {
"title": "緊湊模式",
diff --git a/src/renderer/src/pages/settings/SelectionAssistantSettings/SelectionAssistantSettings.tsx b/src/renderer/src/pages/settings/SelectionAssistantSettings/SelectionAssistantSettings.tsx
index 354a11ea7f..4947b00336 100644
--- a/src/renderer/src/pages/settings/SelectionAssistantSettings/SelectionAssistantSettings.tsx
+++ b/src/renderer/src/pages/settings/SelectionAssistantSettings/SelectionAssistantSettings.tsx
@@ -7,6 +7,7 @@ import { Button, Radio, Row, Slider, Switch, Tooltip } from 'antd'
import { CircleHelp, Edit2 } from 'lucide-react'
import { FC, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
+import { Link } from 'react-router-dom'
import styled from 'styled-components'
import {
@@ -111,8 +112,25 @@ const SelectionAssistantSettings: FC = () => {
value={triggerMode}
onChange={(e) => setTriggerMode(e.target.value as TriggerMode)}
buttonStyle="solid">
- {t('selection.settings.toolbar.trigger_mode.selected')}
- {t('selection.settings.toolbar.trigger_mode.ctrlkey')}
+
+ {t('selection.settings.toolbar.trigger_mode.selected')}
+
+
+ {t('selection.settings.toolbar.trigger_mode.ctrlkey')}
+
+
+ {t('selection.settings.toolbar.trigger_mode.shortcut_note')}
+
+ {t('selection.settings.toolbar.trigger_mode.shortcut_link')}
+
+
+ }
+ arrow>
+ {t('selection.settings.toolbar.trigger_mode.shortcut')}
+
diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts
index 9086a03b98..8b3eca9195 100644
--- a/src/renderer/src/store/migrate.ts
+++ b/src/renderer/src/store/migrate.ts
@@ -16,6 +16,7 @@ import { INITIAL_PROVIDERS, moveProvider } from './llm'
import { mcpSlice } from './mcp'
import { defaultActionItems } from './selectionStore'
import { DEFAULT_SIDEBAR_ICONS, initialState as settingsInitialState } from './settings'
+import { initialState as shortcutsInitialState } from './shortcuts'
import { defaultWebSearchProviders } from './websearch'
// remove logo base64 data to reduce the size of the state
@@ -89,6 +90,48 @@ function addSelectionAction(state: RootState, id: string) {
}
}
+/**
+ * Add shortcuts(ids from shortcutsInitialState) after the shortcut(afterId)
+ * if afterId is 'first', add to the first
+ * if afterId is 'last', add to the last
+ */
+function addShortcuts(state: RootState, ids: string[], afterId: string) {
+ const defaultShortcuts = shortcutsInitialState.shortcuts
+
+ // 确保 state.shortcuts 存在
+ if (!state.shortcuts) {
+ return
+ }
+
+ // 从 defaultShortcuts 中找到要添加的快捷键
+ const shortcutsToAdd = defaultShortcuts.filter((shortcut) => ids.includes(shortcut.key))
+
+ // 过滤掉已经存在的快捷键
+ const existingKeys = state.shortcuts.shortcuts.map((s) => s.key)
+ const newShortcuts = shortcutsToAdd.filter((shortcut) => !existingKeys.includes(shortcut.key))
+
+ if (newShortcuts.length === 0) {
+ return
+ }
+
+ if (afterId === 'first') {
+ // 添加到最前面
+ state.shortcuts.shortcuts.unshift(...newShortcuts)
+ } else if (afterId === 'last') {
+ // 添加到最后面
+ state.shortcuts.shortcuts.push(...newShortcuts)
+ } else {
+ // 添加到指定快捷键后面
+ const afterIndex = state.shortcuts.shortcuts.findIndex((shortcut) => shortcut.key === afterId)
+ if (afterIndex !== -1) {
+ state.shortcuts.shortcuts.splice(afterIndex + 1, 0, ...newShortcuts)
+ } else {
+ // 如果找不到指定的快捷键,则添加到最后
+ state.shortcuts.shortcuts.push(...newShortcuts)
+ }
+ }
+}
+
const migrateConfig = {
'2': (state: RootState) => {
try {
@@ -1508,23 +1551,8 @@ const migrateConfig = {
state.llm.translateModel = SYSTEM_MODELS.defaultModel[2]
}
- // Add selection_assistant_toggle shortcut after mini_window if it doesn't exist
- if (state.shortcuts) {
- const miniWindowIndex = state.shortcuts.shortcuts.findIndex((shortcut) => shortcut.key === 'mini_window')
- const hasSelectionAssistant = state.shortcuts.shortcuts.some(
- (shortcut) => shortcut.key === 'selection_assistant_toggle'
- )
-
- if (miniWindowIndex !== -1 && !hasSelectionAssistant) {
- state.shortcuts.shortcuts.splice(miniWindowIndex + 1, 0, {
- key: 'selection_assistant_toggle',
- shortcut: [],
- editable: true,
- enabled: false,
- system: true
- })
- }
- }
+ // add selection_assistant_toggle and selection_assistant_select_text shortcuts after mini_window
+ addShortcuts(state, ['selection_assistant_toggle', 'selection_assistant_select_text'], 'mini_window')
return state
} catch (error) {
diff --git a/src/renderer/src/store/shortcuts.ts b/src/renderer/src/store/shortcuts.ts
index c0c110f5a4..b6a4f7a0d7 100644
--- a/src/renderer/src/store/shortcuts.ts
+++ b/src/renderer/src/store/shortcuts.ts
@@ -39,6 +39,14 @@ const initialState: ShortcutsState = {
enabled: false,
system: true
},
+ {
+ //to select text with selection assistant
+ key: 'selection_assistant_select_text',
+ shortcut: [],
+ editable: true,
+ enabled: false,
+ system: true
+ },
{
key: 'new_topic',
shortcut: [isMac ? 'Command' : 'Ctrl', 'N'],
diff --git a/src/renderer/src/types/selectionTypes.d.ts b/src/renderer/src/types/selectionTypes.d.ts
index 075dde9982..84b532afaa 100644
--- a/src/renderer/src/types/selectionTypes.d.ts
+++ b/src/renderer/src/types/selectionTypes.d.ts
@@ -1,4 +1,4 @@
-export type TriggerMode = 'selected' | 'ctrlkey'
+export type TriggerMode = 'selected' | 'ctrlkey' | 'shortcut'
export type FilterMode = 'default' | 'whitelist' | 'blacklist'
export interface ActionItem {
id: string