fix: remove restrictions on mac alt+x shortcuts
Restrictions are introduced in earlier beta versions of MacOS Sequoia. However, in the public release, Apple revoke this restrictions. Alt+[Char] shortcut has no restrictions now.
This commit is contained in:
parent
cda4edfb7f
commit
9b17416f9c
@ -786,7 +786,6 @@
|
||||
},
|
||||
"shortcuts": {
|
||||
"action": "Action",
|
||||
"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",
|
||||
|
||||
@ -786,7 +786,6 @@
|
||||
},
|
||||
"shortcuts": {
|
||||
"action": "操作",
|
||||
"alt_warning": "MacではOptionキーとの組み合わせは、スペースキーのみ使用可能です",
|
||||
"clear_shortcut": "ショートカットをクリア",
|
||||
"clear_topic": "メッセージを消去",
|
||||
"copy_last_message": "最後のメッセージをコピー",
|
||||
|
||||
@ -786,7 +786,6 @@
|
||||
},
|
||||
"shortcuts": {
|
||||
"action": "Действие",
|
||||
"alt_warning": "В Mac сочетания с клавишей Option работают только с пробелом",
|
||||
"clear_shortcut": "Очистить сочетание клавиш",
|
||||
"clear_topic": "Очистить все сообщения",
|
||||
"copy_last_message": "Копировать последнее сообщение",
|
||||
|
||||
@ -786,7 +786,6 @@
|
||||
},
|
||||
"shortcuts": {
|
||||
"action": "操作",
|
||||
"alt_warning": "Mac 系统中 Option 键只能与空格键组合使用",
|
||||
"clear_shortcut": "清除快捷键",
|
||||
"clear_topic": "清空消息",
|
||||
"copy_last_message": "复制上一条消息",
|
||||
|
||||
@ -786,7 +786,6 @@
|
||||
},
|
||||
"shortcuts": {
|
||||
"action": "操作",
|
||||
"alt_warning": "Mac 系統中 Option 鍵只能與空白鍵組合使用",
|
||||
"clear_shortcut": "清除快捷鍵",
|
||||
"clear_topic": "清除所有訊息",
|
||||
"copy_last_message": "複製上一条消息",
|
||||
|
||||
@ -59,15 +59,6 @@ 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))
|
||||
|
||||
// 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'
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
return hasModifier && hasNonModifier && keys.length >= 2
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user