From 51e81cc623dff86768f71a95dc566bb306f287a6 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 16 Sep 2023 21:43:56 +0200 Subject: keybind to clear oldest message --- client-web/source/keybinds.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'client-web/source/keybinds.ts') diff --git a/client-web/source/keybinds.ts b/client-web/source/keybinds.ts index 83e05b8..dfc04b4 100644 --- a/client-web/source/keybinds.ts +++ b/client-web/source/keybinds.ts @@ -5,6 +5,7 @@ */ /// +import { GLOBAL_CHAT } from "./chat.ts"; 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" @@ -25,6 +26,7 @@ export function setup_keybinds(room: Room) { if (ev.code == "KeyC" && !ev.ctrlKey) room.local_user.await_add_resource(create_camera_res()) if (ev.code == "KeyC" && ev.ctrlKey) room.local_user.resources.forEach(t => t.destroy()) if (ev.code == "KeyU") if (window.confirm("really update?")) update_serviceworker() + if (ev.code == "KeyV") GLOBAL_CHAT.remove_oldest_message() } }) } -- cgit v1.2.3-70-g09d2