-
-
Notifications
You must be signed in to change notification settings - Fork 187
Closed
Description
Many users change caps to escape on their machine. But Search Box uses event.code === 'Escape'
instead of event.key === 'Escape'
. It represents physical key instead of just key. If i swap caps to escape with this command: setxkbmap -option caps:escape
- it doesn't work. Suggestion is to change this behavior in SearchBox.svelte
file to:
<svelte:window
onkeydown={(e) => {
if (e.key === 'k' && (navigator.platform === 'MacIntel' ? e.metaKey : e.ctrlKey)) {
e.preventDefault();
$search_query = '';
if ($searching) {
close();
} else {
$searching = true;
}
}
if (e.key === 'Escape') {
close();
}
}}
/>
Metadata
Metadata
Assignees
Labels
No labels