Normalise hotkeys so they are all in lowercase, since ^A and ^a are the same key. (might not be needed though, as detectors should read directly from config)
*/
// TODO: Execute on a different thread, because the server hangs and fails any in progress runs if it is still waiting for this
// TODO: Normalise hotkeys so they are all in lowercase, since ^A and ^a are the same key. (might not be needed though, as detectors should read directly from config)
async function executeHotKey(hotkey: HotkeyTypeSingle, hotkeyCode: string, keyboard: Keyboard, executors: ExtractGeneric<ReturnType<typeof loadExecutors>>): Promise<void> {
logger.info(`Executing hotkey ${hotkey}...`);
const executorToCall = hotkey.executor || keyboard.executors.default;
Normalise hotkeys so they are all in lowercase, since ^A and ^a are the same key. (might not be needed though, as detectors should read directly from config)
https://github.com/Gum-Joe/2Keys/blob/ddb18d8aa66b8541e8eb461abbed6c8bcb21a333/packages/@twokeys/server/src/routes/triggerHotkey.ts#L37
172337ee0e2b4e15a0ba6274d49f0ed4716ba8a9