From 6af298c5a332f865e626e1ca3903a5004ba1527d Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 6 Sep 2023 23:13:06 +0200 Subject: fix automatic chat control --- client-web/source/keybinds.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'client-web/source/keybinds.ts') diff --git a/client-web/source/keybinds.ts b/client-web/source/keybinds.ts index 700faeb..aaaefc7 100644 --- a/client-web/source/keybinds.ts +++ b/client-web/source/keybinds.ts @@ -5,6 +5,7 @@ */ /// +import { chat_control } from "./menu.ts"; import { create_camera_res, create_mic_res, create_screencast_res } from "./resource/track.ts"; import { Room } from "./room.ts" import { update_serviceworker } from "./sw/client.ts"; @@ -15,10 +16,8 @@ export function setup_keybinds(room: Room) { if (ev.target instanceof HTMLInputElement && !(ev.target.type == "button")) return if (ev.repeat) return if (ev.code == "Enter" && ev.ctrlKey) { - // TODO! show chat - // room.chat.shown = !room.chat.shown - // if (room.chat.shown) room.chat.focus() - // ev.preventDefault() // so focused buttons dont trigger + chat_control() + ev.preventDefault() // so focused buttons dont trigger } if (ev.shiftKey) { if (ev.code == "KeyM" || ev.code == "KeyR") room.local_user.await_add_resource(create_mic_res()) -- cgit v1.2.3-70-g09d2