feat(ui): Add Ctrl+Alt-Backspace combination key to Virtual Keyboard

Fixes #445 (somewhat)
This commit is contained in:
Marc Brooks 2025-05-14 15:56:10 -05:00
parent 340babac24
commit 9eb0aa8010
No known key found for this signature in database
GPG Key ID: 583A6AF2D6AE1DC6
2 changed files with 14 additions and 3 deletions

View File

@ -143,6 +143,16 @@ function KeyboardWrapper() {
return; return;
} }
if (key === "CtrlAltBackspace") {
sendKeyboardEvent(
[keys["Backspace"]],
[modifiers["ControlLeft"], modifiers["AltLeft"]],
);
setTimeout(resetKeyboardState, 100);
return;
}
if (isKeyShift || isKeyCaps) { if (isKeyShift || isKeyCaps) {
toggleLayout(); toggleLayout();
@ -257,13 +267,13 @@ function KeyboardWrapper() {
buttonTheme={[ buttonTheme={[
{ {
class: "combination-key", class: "combination-key",
buttons: "CtrlAltDelete AltMetaEscape", buttons: "CtrlAltDelete AltMetaEscape CtrlAltBackspace",
}, },
]} ]}
display={keyDisplayMap} display={keyDisplayMap}
layout={{ layout={{
default: [ default: [
"CtrlAltDelete AltMetaEscape", "CtrlAltDelete AltMetaEscape CtrlAltBackspace",
"Escape F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12", "Escape F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12",
"Backquote Digit1 Digit2 Digit3 Digit4 Digit5 Digit6 Digit7 Digit8 Digit9 Digit0 Minus Equal Backspace", "Backquote Digit1 Digit2 Digit3 Digit4 Digit5 Digit6 Digit7 Digit8 Digit9 Digit0 Minus Equal Backspace",
"Tab KeyQ KeyW KeyE KeyR KeyT KeyY KeyU KeyI KeyO KeyP BracketLeft BracketRight Backslash", "Tab KeyQ KeyW KeyE KeyR KeyT KeyY KeyU KeyI KeyO KeyP BracketLeft BracketRight Backslash",
@ -272,7 +282,7 @@ function KeyboardWrapper() {
"ControlLeft AltLeft MetaLeft Space MetaRight AltRight", "ControlLeft AltLeft MetaLeft Space MetaRight AltRight",
], ],
shift: [ shift: [
"CtrlAltDelete AltMetaEscape", "CtrlAltDelete AltMetaEscape CtrlAltBackspace",
"Escape F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12", "Escape F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12",
"(Backquote) (Digit1) (Digit2) (Digit3) (Digit4) (Digit5) (Digit6) (Digit7) (Digit8) (Digit9) (Digit0) (Minus) (Equal) (Backspace)", "(Backquote) (Digit1) (Digit2) (Digit3) (Digit4) (Digit5) (Digit6) (Digit7) (Digit8) (Digit9) (Digit0) (Minus) (Equal) (Backspace)",
"Tab (KeyQ) (KeyW) (KeyE) (KeyR) (KeyT) (KeyY) (KeyU) (KeyI) (KeyO) (KeyP) (BracketLeft) (BracketRight) (Backslash)", "Tab (KeyQ) (KeyW) (KeyE) (KeyR) (KeyT) (KeyY) (KeyU) (KeyI) (KeyO) (KeyP) (BracketLeft) (BracketRight) (Backslash)",

View File

@ -227,6 +227,7 @@ export const modifierDisplayMap: Record<string, string> = {
export const keyDisplayMap: Record<string, string> = { export const keyDisplayMap: Record<string, string> = {
CtrlAltDelete: "Ctrl + Alt + Delete", CtrlAltDelete: "Ctrl + Alt + Delete",
AltMetaEscape: "Alt + Meta + Escape", AltMetaEscape: "Alt + Meta + Escape",
CtrlAltBackspace: "Ctrl + Alt + Backspace",
Escape: "esc", Escape: "esc",
Tab: "tab", Tab: "tab",
Backspace: "backspace", Backspace: "backspace",