From 4d5d9849da67f20579bfbd662b68676217a7e755 Mon Sep 17 00:00:00 2001 From: 2mal3 <56305732+2mal3@users.noreply.github.com> Date: Mon, 19 Jan 2026 18:47:53 +0100 Subject: [PATCH] feat: support sending modifier keys (#18) Co-authored-by: E44 <129310925+programmer-44@users.noreply.github.com> --- .../frontend/src/routes/ControlView.svelte | 66 +++--- control/frontend/src/routes/KeyInput.svelte | 190 ++++++++++++------ display/pkg/keyboard.go | 178 ++++++++++++++++ display/pkg/keys.go | 129 ------------ display/pkg/main.go | 42 ---- display/web/main.go | 8 +- shared/keys.json | 114 ----------- 7 files changed, 339 insertions(+), 388 deletions(-) create mode 100644 display/pkg/keyboard.go delete mode 100644 display/pkg/keys.go delete mode 100644 shared/keys.json diff --git a/control/frontend/src/routes/ControlView.svelte b/control/frontend/src/routes/ControlView.svelte index accd15a..865cb41 100644 --- a/control/frontend/src/routes/ControlView.svelte +++ b/control/frontend/src/routes/ControlView.svelte @@ -57,6 +57,7 @@ snippet: send_keys_popup, title: 'Tastatur-Eingaben Senden', title_icon: Keyboard, + window_class: 'h-full' }; }; @@ -123,17 +124,8 @@ ); } - async function send_single_key_press(key: string) { - await run_on_all_selected_displays((d) => - send_keyboard_input(d.ip, [{ key, action: 'press' }]) - ); - setTimeout( - async () => - await run_on_all_selected_displays((d) => - send_keyboard_input(d.ip, [{ key, action: 'release' }]) - ), - 10 - ); + async function send_single_key_press(key: string, action: 'press' | 'release') { + await run_on_all_selected_displays((d) => send_keyboard_input(d.ip, [{ key, action }])); } let website_url = $state(''); let website_url_valid = $state(false); @@ -192,14 +184,7 @@ {/snippet} {#snippet send_keys_popup()} -