Convert meta / control to mod only on the correct platforms #1678

This commit is contained in:
Ben Gotow 2019-10-21 16:20:20 -05:00
parent 8963b14364
commit ed0270c17e

View file

@ -169,7 +169,11 @@ export default class CommandKeybinding extends React.Component<
let editingBinding = keys.join(' ');
if (modifiers.length > 0) {
editingBinding = [...modifiers, ...keys].join('+');
editingBinding = editingBinding.replace(/(meta|command|ctrl)/g, 'mod');
if (process.platform === 'darwin') {
editingBinding = editingBinding.replace(/meta/g, 'mod');
} else {
editingBinding = editingBinding.replace(/ctrl/g, 'mod');
}
}
this.setState({ keys, modifiers, editingBinding });