diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 4e578d8d28..2d71943bce 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -358,18 +358,25 @@ module.exports = React.createClass({ }, onKeyDown: function(ev) { - var handled = false; + let handled = false; + const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0; + let ctrlCmdOnly; + if (isMac) { + ctrlCmdOnly = ev.metaKey && !ev.altKey && !ev.ctrlKey && !ev.shiftKey; + } else { + ctrlCmdOnly = ev.ctrlKey && !ev.altKey && !ev.metaKey && !ev.shiftKey; + } switch (ev.keyCode) { case KeyCode.KEY_D: - if (ev.ctrlKey) { + if (ctrlCmdOnly) { this.onMuteAudioClick(); handled = true; } break; case KeyCode.KEY_E: - if (ev.ctrlKey) { + if (ctrlCmdOnly) { this.onMuteVideoClick(); handled = true; }