From 005dcec7cd1be82846bef93a1f81c081fc7108ba Mon Sep 17 00:00:00 2001 From: Blockyheadman <80011716+Blockyheadman@users.noreply.github.com> Date: Sat, 1 Aug 2026 01:19:50 -0500 Subject: [PATCH 1/3] achieve agnostic accelerator arrangement amazingly --- src/ts/apps/process.ts | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/ts/apps/process.ts b/src/ts/apps/process.ts index f1b57303..c3a95530 100755 --- a/src/ts/apps/process.ts +++ b/src/ts/apps/process.ts @@ -330,25 +330,24 @@ export class AppProcess extends Process implements IAppProcess { if (state != "desktop" || this._disposed) return; - for (const combo of this.acceleratorStore) { - const alt = combo.alt ? e.altKey : true; - const ctrl = combo.ctrl ? e.ctrlKey : true; - const shift = combo.shift ? e.shiftKey : true; - /** */ - const modifiers = alt && ctrl && shift; - /** */ - const pK = e.key.toLowerCase().trim(); - const key = combo.key?.trim().toLowerCase(); - const codedKey = String.fromCharCode(e.keyCode).toLowerCase(); - /** */ - const isFocused = Stack.renderer?.focusedPid() == this.pid || combo.global; - - if (!modifiers || (key != pK && key && key != codedKey) || !isFocused) continue; - - if (!Daemon?.elevation!._elevating) await combo.action(this, e); - - break; - } + const combo = this.acceleratorStore.find((combo) => { + const ctrl = combo.ctrl ? e.ctrlKey : e.ctrlKey === false; + const shift = combo.shift ? e.shiftKey : e.shiftKey === false; + const alt = combo.alt ? e.altKey : e.altKey === false; + + const comboKey = combo.key?.trim().toLowerCase(); + const pressedKey = e.key.toLowerCase().trim(); + const codedKey = e.code.toLowerCase(); + + if (!ctrl || !shift || !alt || (pressedKey != comboKey && codedKey != comboKey)) return false; + return true; + }); + + if (!combo) return; + + console.log("found accelerator matche:", combo); + + if (!Daemon?.elevation!._elevating) await combo.action(this, e); } public unfocusActiveElement() { From 0d08a28a9fb3d916e8bd643ac9dcc2d0123ed9ab Mon Sep 17 00:00:00 2001 From: Blockyheadman <80011716+Blockyheadman@users.noreply.github.com> Date: Sat, 1 Aug 2026 01:22:31 -0500 Subject: [PATCH 2/3] shit --- src/ts/apps/process.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ts/apps/process.ts b/src/ts/apps/process.ts index c3a95530..6b40055d 100755 --- a/src/ts/apps/process.ts +++ b/src/ts/apps/process.ts @@ -345,8 +345,6 @@ export class AppProcess extends Process implements IAppProcess { if (!combo) return; - console.log("found accelerator matche:", combo); - if (!Daemon?.elevation!._elevating) await combo.action(this, e); } From 9a00f4cb3dec799b88ea8b8083958d527995b169 Mon Sep 17 00:00:00 2001 From: Blockyheadman <80011716+Blockyheadman@users.noreply.github.com> Date: Sat, 1 Aug 2026 09:32:45 -0500 Subject: [PATCH 3/3] forgot to check focus state --- src/ts/apps/process.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ts/apps/process.ts b/src/ts/apps/process.ts index 6b40055d..7fb75a15 100755 --- a/src/ts/apps/process.ts +++ b/src/ts/apps/process.ts @@ -343,7 +343,9 @@ export class AppProcess extends Process implements IAppProcess { return true; }); - if (!combo) return; + const isFocused = Stack.renderer?.focusedPid() == this.pid || combo?.global; + + if (!combo || !isFocused) return; if (!Daemon?.elevation!._elevating) await combo.action(this, e); }