Gum-Joe / 2Keys

A easy to setup second keyboard, designed for everyone.
GNU General Public License v3.0
11 stars 4 forks source link

Normalise hotkeys so they are all in lowercase, si... #134

Open github-actions[bot] opened 4 years ago

github-actions[bot] commented 4 years ago

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

 */
// 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;

172337ee0e2b4e15a0ba6274d49f0ed4716ba8a9