Fix Push To Talk

you love half line fixes
This commit is contained in:
Tuxinal 2025-02-08 16:50:24 +03:30
parent 807ccb4a5f
commit f654286485

View file

@ -117,7 +117,6 @@ addPatch({
[ [
"UNASSIGNED", "UNASSIGNED",
"SWITCH_TO_VOICE_CHANNEL", "SWITCH_TO_VOICE_CHANNEL",
"PUSH_TO_TALK",
"TOGGLE_OVERLAY", "TOGGLE_OVERLAY",
"TOGGLE_OVERLAY_INPUT_LOCK", "TOGGLE_OVERLAY_INPUT_LOCK",
"TOGGLE_PRIORITY_SPEAKER", "TOGGLE_PRIORITY_SPEAKER",
@ -132,9 +131,11 @@ addPatch({
return; return;
} }
keybindCallbacks[id] = { keybindCallbacks[id] = {
// TODO: the "undefined" here is supposed to be a context. basically only used by push to talk to determine if you are in ptt mode or not onTrigger: (keyState: boolean) =>
// (it's also used by switch to channel to determine the channel but you can't really define that through xdp) val.onTrigger(keyState, {
onTrigger: (keyState: boolean) => val.onTrigger(keyState, undefined), // switch to channel also requires some extra properties that would have to be supplied here
context: undefined
}),
keyEvents: val.keyEvents keyEvents: val.keyEvents
}; };
actions.push({ id, name: actionReadableNames[key] || key }); actions.push({ id, name: actionReadableNames[key] || key });