diff --git a/companion-bridge/index.js b/companion-bridge/index.js index e33ed85046d..0e9076bf1b3 100644 --- a/companion-bridge/index.js +++ b/companion-bridge/index.js @@ -6,10 +6,16 @@ const { WebSocketServer } = require("ws"); const PORT = 6969; const pressedKeys = new Set(); const ToggleBindings = new Map([ + [61010, "TOGGLE_MUTE"], [UiohookKey.Insert, "TOGGLE_MUTE"], + [3666, "TOGGLE_MUTE"], [UiohookKey.Numpad0, "TOGGLE_MUTE"], + [82, "TOGGLE_MUTE"], + [60999, "TOGGLE_DEAFEN"], [UiohookKey.Home, "TOGGLE_DEAFEN"], - [UiohookKey.Numpad7, "TOGGLE_DEAFEN"] + [3655, "TOGGLE_DEAFEN"], + [UiohookKey.Numpad7, "TOGGLE_DEAFEN"], + [71, "TOGGLE_DEAFEN"] ]); const wss = new WebSocketServer({ host: "127.0.0.1", port: PORT }); diff --git a/src/userplugins/customkeybinds/index.ts b/src/userplugins/customkeybinds/index.ts index 9e0db6e9c02..d84fb574e42 100644 --- a/src/userplugins/customkeybinds/index.ts +++ b/src/userplugins/customkeybinds/index.ts @@ -133,15 +133,14 @@ export default definePlugin({ clearReconnectTimer(); bridgeSocket?.close(); bridgeSocket = null; + connectBridge(); if (!Native) { showToast("CustomKeybinds companion server auto-start is only available on desktop.", Toasts.Type.FAILURE); return; } - void Native.startCompanionServer().then(() => { - connectBridge(); - }).catch(error => { + void Native.startCompanionServer().catch(error => { logger.error("Failed to start companion bridge:", error); showToast( error instanceof Error ? error.message : "Failed to start the CustomKeybinds companion server.",