Hi,
One of my apps allows customising keyboard shortcuts; I started to see weird behaviours, where most of the pressed keys would produce a “h” (the app triggers the Keyboard.AsyncKeyDown function to find pressed keys).
So I made a small test in a blank project, with a timer:
Var pk() As String
for i as Integer=0 to 127
if Keyboard.AsyncKeyDown(i) then pk.Add i.ToString
next
self.Title=String.FromArray(pk)
Running this, I’m finding that the key 4 (which is indeed “h”) is always reported as pressed, as long as the app is in front. Additional keys I may press are reported correctly, but “4” always remains on even with no key pressed at all.
When the app isn’t frontmost, all is fine (only the actually pressed keys are reported). Also, the keyboard viewer doesn’t show the key as pressed. It looks to me it’s a Xojo issue.
Tested this on Mac OS Monterey.
This is rather puzzling…
Hoping someone could test the code above, please.