fix(control): check for main button

This commit is contained in:
E44
2026-06-15 21:20:22 +02:00
parent 2dc46c186e
commit fab846d843
2 changed files with 8 additions and 4 deletions
@@ -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')
);
+4 -2
View File
@@ -141,11 +141,13 @@
<button
title="Windows-/Meta-Taste [gedrückt halten möglich]"
class="px-3 bg-stone-700 py-2 gap-2 rounded-xl flex items-center transition-colors duration-200 hover:bg-stone-600 active:bg-stone-500 cursor-pointer"
onmousedown={async (e) => {
onmousedown={async (e: MouseEvent) => {
if (e.button !== 0) return;
e.preventDefault();
await on_key('MetaLeft', true);
}}
onmouseup={async () => {
onmouseup={async (e: MouseEvent) => {
if (e.button !== 0) return;
await on_key('MetaLeft', false);
}}
>