feat: handle escape key and higher wheel zoom ratio (#3471)

This commit is contained in:
martin 2023-07-30 18:03:08 +02:00 committed by GitHub
parent 95c75c289c
commit e368b9e50b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 12 deletions

View file

@ -89,16 +89,19 @@
return;
}
if (event.key === '/') {
event.preventDefault();
}
if (!$isViewingAssetStoreState) {
switch (event.key) {
case 'Escape':
assetInteractionStore.clearMultiselect();
return;
case '?':
if (event.shiftKey) showShortcuts = !showShortcuts;
if (event.shiftKey) {
event.preventDefault();
showShortcuts = !showShortcuts;
}
return;
case '/':
event.preventDefault();
goto(AppRoute.EXPLORE);
return;
}