From 62bc550d3af96205cf4cbd668aec01f10609668a Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 21 Jun 2024 23:32:17 +0300 Subject: [PATCH] Open enums with Alt+Space (also non-breaking) --- public/scripts/autocomplete/AutoComplete.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/scripts/autocomplete/AutoComplete.js b/public/scripts/autocomplete/AutoComplete.js index a7f8ceb0c..df3bcf75c 100644 --- a/public/scripts/autocomplete/AutoComplete.js +++ b/public/scripts/autocomplete/AutoComplete.js @@ -750,8 +750,10 @@ export class AutoComplete { } // autocomplete shown or not, cursor anywhere switch (evt.key) { + // The first is a non-breaking space, the second is a regular space. + case ' ': case ' ': { - if (evt.ctrlKey) { + if (evt.ctrlKey || evt.altKey) { if (this.isActive && this.isReplaceable) { // ctrl-space to toggle details for selected item this.toggleDetails(); @@ -759,6 +761,8 @@ export class AutoComplete { // ctrl-space to force show autocomplete this.show(false, true); } + evt.preventDefault(); + evt.stopPropagation(); return; } break;