mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-10 07:55:24 +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.
|
* @param {KeyboardEvent} e - keyboard event.
|
||||||
*/
|
*/
|
||||||
keyboardListener(e) {
|
keyboardListener(e) {
|
||||||
// If Ctrl + P is pressed, focus search input.
|
// If Ctrl+P or ⌘+P is pressed, focus search input.
|
||||||
if (e.ctrlKey && e.code === 'KeyP') {
|
if ((e.ctrlKey || e.metaKey) && e.code === 'KeyP') {
|
||||||
this.nodes.search.focus();
|
this.nodes.search.focus();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue