Skip to content

Commit

Permalink
Merge pull request QB64-Phoenix-Edition#476 from a740g/key-special-fix
Browse files Browse the repository at this point in the history
Avoid monitoring special keys when the window is not in focus
  • Loading branch information
a740g committed Mar 30, 2024
2 parents 11e4059 + edbc772 commit 74116f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/c/libqb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27656,6 +27656,11 @@ void GLUT_key_special(int32 key, int32 down) {
# endif

if (vk != -1) {
# ifdef QB64_WINDOWS
if (!func__hasfocus() && !(keyheld(vk) && !down))
return;
# endif

if (down)
keydown_vk(vk);
else
Expand Down

0 comments on commit 74116f7

Please sign in to comment.