mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-05 16:37:09 +00:00
fix(control): check for main button
This commit is contained in:
@@ -266,10 +266,12 @@
|
|||||||
? 'text-stone-500 cursor-not-allowed'
|
? '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"
|
: '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}
|
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'));
|
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(
|
add_to_keyboard_queue(
|
||||||
async () => await send_single_key_press('ArrowLeft', 'release')
|
async () => await send_single_key_press('ArrowLeft', 'release')
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -141,11 +141,13 @@
|
|||||||
<button
|
<button
|
||||||
title="Windows-/Meta-Taste [gedrückt halten möglich]"
|
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"
|
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();
|
e.preventDefault();
|
||||||
await on_key('MetaLeft', true);
|
await on_key('MetaLeft', true);
|
||||||
}}
|
}}
|
||||||
onmouseup={async () => {
|
onmouseup={async (e: MouseEvent) => {
|
||||||
|
if (e.button !== 0) return;
|
||||||
await on_key('MetaLeft', false);
|
await on_key('MetaLeft', false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user