hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.11k stars 884 forks source link

Fast synthetic keypresses are not registering #6006

Closed JeffDess closed 5 months ago

JeffDess commented 5 months ago

Hyprland Version

System/Version info _This is taken from an older working commit_ ```sh Hyprland, built from branch at commit e87227e00ae350adebafd2adde95a47e1f68cb3a (config: Default unconfigured monitors to open to the right (5741)). Date: Thu Apr 25 17:07:50 2024 Tag: v0.39.1-82-ge87227e0, commits: 4542 flags: (if any) System Information: System name: Linux Node name: Release: 6.8.9-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Thu, 02 May 2024 17:49:46 +0000 GPU information: 2f:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c1) (prog-if 00 [VGA controller]) os-release: NAME=ArcoLinux ID=arcolinux ID_LIKE=arch BUILD_ID=rolling ANSI_COLOR="0;36" HOME_URL="https://arcolinux.info/" SUPPORT_URL="https://arcolinuxforum.com/" BUG_REPORT_URL="https://github.com/arcolinux" LOGO=arcolinux-hello plugins: > ```

Bug or Regression?

Regression

Description

Hi, I use a Ploopy Nano trackball and it can be turned into a "scroll wheel" by pressing NumLock twice very quickly (50ms). Since I can't type that fast, I am using a macro on my programmable keyboard to trigger the scroll mode. With the recent changes to the repo, it's no longer working. I have identified 20d79501 to have introduced the bug.

Note: I had to rebase 48d71bb1 to put it just after 8a226927, otherwise I couldn't build 20d79501.

Setup

I've tried to assign the same macro to the 'a' keypress. When I trigger it, I see 'aa' in a text editor. So I guess the keypress are not dropped/deduped, but my guess is they rather exceed the 50ms window. Unless there's more going on?

When tracing the inputs with wev, I see that's everything registers well within that timeframe. The output with older working commits is nearly identical.

Any idea what's going on here?

How to reproduce

  1. With the setup describe before, build commit 20d79501.
  2. Log out
  3. Start a new session
  4. Trigger the ZMK macro
  5. Try to move cursor, it will move.

Repeating with older commits, cursor will not move at step 5, but content will scroll if cursor is over a scrollable area.

Crash reports, logs, images, videos

JeffDess commented 5 months ago

Built a new QMK Firmware with a 200ms window, it's not doing anything either when triggering the macro. So I believe I assumed wrong and there's something else at play here.

JeffDess commented 5 months ago

I tested this morning with 2ead1fd and no longer experiencing the bug. I will do a bit more testing but this might be resolved.

JeffDess commented 5 months ago

Yes, I ran the same build on another computer and the scroll mode seems to work fine now. Thanks!