Skip to content

Commit

Permalink
Remove duplicate browser detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jan 17, 2018
1 parent df0497a commit 300d986
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions editor/edit-post/keyboard-shortcuts.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
const isMac = window.navigator.platform.toUpperCase().indexOf( 'MAC' ) >= 0;
const mod = isMac ? '⌘' : 'Ctrl';
/**
* WordPress dependencies
*/
import { keycodes } from '@wordpress/utils';

const { getAccessCombination } = keycodes;

const combination = getAccessCombination( 'm' );

export default {
toggleEditorMode: {
value: 'mod+shift+alt+m',
label: `${ mod }+Shift+Alt+M`,
value: combination.toLowerCase(),
label: combination,
},
};

0 comments on commit 300d986

Please sign in to comment.