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:
parent
f0225b8c8d
commit
46669dcfef
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue