diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json index db23fc9ed..beee13c60 100644 --- a/src/renderer/src/i18n/locales/en-us.json +++ b/src/renderer/src/i18n/locales/en-us.json @@ -715,7 +715,7 @@ }, "shortcuts": { "action": "Action", - "alt_warning": "Mac does not support Option + letters as shortcuts", + "alt_warning": "On Mac, Option key combinations only work with the Space key", "clear_shortcut": "Clear Shortcut", "clear_topic": "Clear Messages", "copy_last_message": "Copy Last Message", diff --git a/src/renderer/src/i18n/locales/ja-jp.json b/src/renderer/src/i18n/locales/ja-jp.json index 8b51990b2..16f489ba9 100644 --- a/src/renderer/src/i18n/locales/ja-jp.json +++ b/src/renderer/src/i18n/locales/ja-jp.json @@ -715,7 +715,7 @@ }, "shortcuts": { "action": "操作", - "alt_warning": "MacではOption + 文字をショートカットとして使用できません", + "alt_warning": "MacではOptionキーとの組み合わせは、スペースキーのみ使用可能です", "clear_shortcut": "ショートカットをクリア", "clear_topic": "メッセージを消去", "copy_last_message": "最後のメッセージをコピー", diff --git a/src/renderer/src/i18n/locales/ru-ru.json b/src/renderer/src/i18n/locales/ru-ru.json index fed2c21b8..35b5cbd5e 100644 --- a/src/renderer/src/i18n/locales/ru-ru.json +++ b/src/renderer/src/i18n/locales/ru-ru.json @@ -714,7 +714,7 @@ }, "shortcuts": { "action": "Действие", - "alt_warning": "Mac не поддерживает Option + буквы как горячие клавиши", + "alt_warning": "В Mac сочетания с клавишей Option работают только с пробелом", "clear_shortcut": "Очистить сочетание клавиш", "clear_topic": "Очистить все сообщения", "copy_last_message": "Копировать последнее сообщение", diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index f8e37451c..a5a051b4e 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -715,7 +715,7 @@ }, "shortcuts": { "action": "操作", - "alt_warning": "Mac 系统不能使用 Option + 字母作为快捷键", + "alt_warning": "Mac 系统中 Option 键只能与空格键组合使用", "clear_shortcut": "清除快捷键", "clear_topic": "清空消息", "copy_last_message": "复制上一条消息", diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index ea5da176f..da003c51d 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -714,7 +714,7 @@ }, "shortcuts": { "action": "操作", - "alt_warning": "Mac 不能使用 Option + 字母作為快捷鍵", + "alt_warning": "Mac 系統中 Option 鍵只能與空白鍵組合使用", "clear_shortcut": "清除快捷鍵", "clear_topic": "清除所有訊息", "copy_last_message": "複製上一条消息", diff --git a/src/renderer/src/pages/settings/ShortcutSettings.tsx b/src/renderer/src/pages/settings/ShortcutSettings.tsx index 7d0a2e41c..9d8cdb285 100644 --- a/src/renderer/src/pages/settings/ShortcutSettings.tsx +++ b/src/renderer/src/pages/settings/ShortcutSettings.tsx @@ -59,7 +59,8 @@ const ShortcutSettings: FC = () => { const hasModifier = keys.some((key) => ['Control', 'Ctrl', 'Command', 'Alt', 'Shift'].includes(key)) const hasNonModifier = keys.some((key) => !['Control', 'Ctrl', 'Command', 'Alt', 'Shift'].includes(key)) - if (isMac && keys.includes('Alt')) { + // only allows option + space + if (isMac && keys[0] === 'Alt' && !['Space', undefined].includes(keys[1])) { window.message.warning({ content: t('settings.shortcuts.alt_warning'), key: 'shortcut-alt-warning'