mulaRahul / keyviz

Keyviz is a free and open-source tool to visualize your keystrokes ⌨️ and 🖱️ mouse actions in real-time.
https://mularahul.github.io/keyviz
GNU General Public License v3.0
5.25k stars 173 forks source link

[Bug] Occasional “F22” key appears, and won't disappear. #136

Open EvenZHAnglll opened 1 year ago

EvenZHAnglll commented 1 year ago

Describe the bug There is a "F22" key shown in the bar, and won't disappear.

Version: v1.0.6

To Reproduce After trying, I found a way to reproduce exactly. It's related with WeChat client on Windows.

  1. run the keyviz
  2. login WeChat windows client
  3. "F22" key shows up

Expected behavior Regardless of whether it is a bug caused by WeChat app, the “F22” key should not appear. Because it is not a key.

Screenshots The "F22" appear.

Screenshot 2023-05-18 082958

Desktop:

EvenZHAnglll commented 1 year ago

I did some research and found that some old-fashioned keyboards do indeed have an F22 key. F22 is an actual key. But now, general keyboards only have F1 to F12 and do not have F13 to F24.

The reason for this bug seems to be due to WeChat, not keyviz.

But this frequently occurring F22 is really annoying. Maybe an option can be added to not display F13 to F24 Key.

mulaRahul commented 1 year ago

Indeed old keyboards had keys from F13 to F24 and there is keymapping for the same as well -https://github.com/mulaRahul/keyviz/blob/79905cfe15efeb5580fcb7be003464fa19649889/lib/data/keymaps.dart#L79-L104

The same have been reported in #102 as well. And maybe it's related to #56, #88.

But as mentioned, modern keyboards don't have F13-F24. I should opt out the same. And also set a mechanism that detects visualizations that doesn't disappear and remove the same after an interval.

leumasme commented 1 year ago

But as mentioned, modern keyboards don't have F13-F24.

Just as a sidenote, F13-F24 is often used in laptops where for example something like Shift/FN+F[x] may trigger a keypress for F[x+12] (or other way around if fn-lock is toggled), so they are not completely obsolete.

singularity2000 commented 1 year ago

The same here