Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shift key not recognized when focus is changed to QB64 program
#12
Something to note, on Windows the Shift keys are special/bugged, I think that's part of what you're seeing and probably why _KeyDown doesn't report it in this case. I put in a bug fix for the shift keys a while back that applies to _Devices, that's why it's always correct, in that case it uses GetAsyncKeyState to check the shift keys rather than relying on the WM_KEYDOWN and WM_KEYUP messages.

In regards to keyboard state when not in focus, in theory I don't think we should see any keys when the window loses focus but they should appear as pressed when the window regains focus if they were held down. GetAsyncKeyState does allow you to see the keys at all times on Windows, I believe. On Linux and potentially Mac OS that's not always allowed for security reasons though, so it's not really something you can reliably implement in a platform-independent way.
Reply


Messages In This Thread
RE: Shift key not recognized when focus is changed to QB64 program - by DSMan195276 - 09-17-2024, 08:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  kill "filename.ext" = shift-delete doppler 11 437 02-27-2026, 10:24 PM
Last Post: SMcNeill
  Is there any way to tell what within a QB64 program is triggering false AV detetions? hanness 9 834 12-01-2025, 11:04 AM
Last Post: doppler
  This program causes QB64 to crash - SOLVED Petr 3 823 03-26-2023, 03:59 PM
Last Post: bplus
  Tough to ID key sequences... Pete 4 972 12-04-2022, 04:57 AM
Last Post: Pete

Forum Jump:


Users browsing this thread: 1 Guest(s)