macOS shortcuts: Only listen for command key, not control key
This commit is contained in:
parent
d86e8ef7ec
commit
2c7baad68d
10 changed files with 59 additions and 39 deletions
|
@ -653,6 +653,9 @@ export const CompositionInput = ({
|
|||
const editorKeybindingFn = React.useCallback(
|
||||
// tslint:disable-next-line cyclomatic-complexity
|
||||
(e: React.KeyboardEvent): CompositionInputEditorCommand | null => {
|
||||
const commandKey = get(window, 'platform') === 'darwin' && e.metaKey;
|
||||
const controlKey = get(window, 'platform') !== 'darwin' && e.ctrlKey;
|
||||
|
||||
if (e.key === 'Enter' && emojiResults.length > 0) {
|
||||
e.preventDefault();
|
||||
|
||||
|
@ -660,7 +663,7 @@ export const CompositionInput = ({
|
|||
}
|
||||
|
||||
if (e.key === 'Enter' && !e.shiftKey) {
|
||||
if (large && !(e.ctrlKey || e.metaKey)) {
|
||||
if (large && !(controlKey || commandKey)) {
|
||||
return getDefaultKeyBinding(e);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue