mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
macOS shortcuts: Only listen for command key, not control key
This commit is contained in:
committed by
Ken Powers
parent
d86e8ef7ec
commit
2c7baad68d
@@ -5,7 +5,7 @@ import {
|
||||
CellMeasurerCache,
|
||||
List,
|
||||
} from 'react-virtualized';
|
||||
import { debounce, isNumber } from 'lodash';
|
||||
import { debounce, get, isNumber } from 'lodash';
|
||||
|
||||
import { Intl } from './Intl';
|
||||
import { Emojify } from './conversation/Emojify';
|
||||
@@ -136,7 +136,9 @@ export class SearchResults extends React.Component<PropsType, StateType> {
|
||||
|
||||
public handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {
|
||||
const { items } = this.props;
|
||||
const commandOrCtrl = event.metaKey || event.ctrlKey;
|
||||
const commandKey = get(window, 'platform') === 'darwin' && event.metaKey;
|
||||
const controlKey = get(window, 'platform') !== 'darwin' && event.ctrlKey;
|
||||
const commandOrCtrl = commandKey || controlKey;
|
||||
|
||||
if (!items || items.length < 1) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user