From fab846d843dfa8cdeea274c21a39965cb61db052 Mon Sep 17 00:00:00 2001 From: E44 <129310925+programmer-44@users.noreply.github.com> Date: Mon, 15 Jun 2026 21:20:22 +0200 Subject: [PATCH] fix(control): check for main button --- control/frontend/src/routes/ControlView.svelte | 6 ++++-- control/frontend/src/routes/KeyInput.svelte | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/control/frontend/src/routes/ControlView.svelte b/control/frontend/src/routes/ControlView.svelte index 6fd29ab..14dca3d 100644 --- a/control/frontend/src/routes/ControlView.svelte +++ b/control/frontend/src/routes/ControlView.svelte @@ -266,10 +266,12 @@ ? 'text-stone-500 cursor-not-allowed' : 'hover:bg-stone-600 active:bg-stone-500 cursor-pointer'} py-2 rounded-xl flex justify-center items-center transition-colors duration-200" disabled={$selected_online_display_ids.length === 0 || key_pressed.ArrowLeft} - onmousedown={() => { + onmousedown={(e: MouseEvent) => { + if (e.button !== 0) return; add_to_keyboard_queue(async () => await send_single_key_press('ArrowLeft', 'press')); }} - onmouseup={() => { + onmouseup={(e: MouseEvent) => { + if (e.button !== 0) return; add_to_keyboard_queue( async () => await send_single_key_press('ArrowLeft', 'release') ); diff --git a/control/frontend/src/routes/KeyInput.svelte b/control/frontend/src/routes/KeyInput.svelte index fefe10b..56cff93 100644 --- a/control/frontend/src/routes/KeyInput.svelte +++ b/control/frontend/src/routes/KeyInput.svelte @@ -141,11 +141,13 @@