1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-07 14:35:26 +02:00

metakey added

This commit is contained in:
Umang G. Patel 2022-07-25 21:27:13 +05:30
parent f0225b8c8d
commit 46669dcfef

View file

@ -214,8 +214,8 @@ export default class Sidebar {
* @param {KeyboardEvent} e - keyboard event.
*/
keyboardListener(e) {
// If Ctrl + P is pressed, focus search input.
if (e.ctrlKey && e.code === 'KeyP') {
// If Ctrl+P or ⌘+P is pressed, focus search input.
if ((e.ctrlKey || e.metaKey) && e.code === 'KeyP') {
this.nodes.search.focus();
e.preventDefault();
}