How to use the @wordpress/keycodes.displayShortcut.secondary function in @wordpress/keycodes

To help you get started, we’ve selected a few @wordpress/keycodes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github WordPress / gutenberg / packages / edit-post / src / keyboard-shortcuts.js View on Github external
/**
 * WordPress dependencies
 */
import { rawShortcut, displayShortcut, shortcutAriaLabel } from '@wordpress/keycodes';

export default {
	toggleEditorMode: {
		raw: rawShortcut.secondary( 'm' ),
		display: displayShortcut.secondary( 'm' ),
	},
	toggleSidebar: {
		raw: rawShortcut.primaryShift( ',' ),
		display: displayShortcut.primaryShift( ',' ),
		ariaLabel: shortcutAriaLabel.primaryShift( ',' ),
	},
};
github WordPress / gutenberg / packages / edit-post / src / components / text-editor / index.js View on Github external
function TextEditor( { onExit, isRichEditingEnabled } ) {
	return (
		<div>
			{ isRichEditingEnabled &amp;&amp; (
				<div>
					<h2>{ __( 'Editing Code' ) }</h2>
					
						{ __( 'Exit Code Editor' ) }
					
					
				</div>
			)	}
			<div>
				
				
			</div>
		</div>
	);
}
github WordPress / gutenberg / packages / edit-post / src / components / text-editor / index.js View on Github external
function TextEditor( { onExit, isRichEditingEnabled } ) {
	return (
		<div>
			{ isRichEditingEnabled &amp;&amp; (
				<div>
					<h2>{ __( 'Editing Code' ) }</h2>
					<button>
						{ __( 'Exit Code Editor' ) }
					</button>
					
				</div>
			)	}
			<div>
				
				
			</div>
		</div>
	);
}
github Automattic / wp-calypso / client / gutenberg / editor / edit-post / keyboard-shortcuts.js View on Github external
/**
 * External dependencies
 */
import { rawShortcut, displayShortcut } from '@wordpress/keycodes';

export default {
	toggleEditorMode: {
		value: rawShortcut.secondary( 'm' ),
		label: displayShortcut.secondary( 'm' ),
	},
};