Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shift key not recognized when focus is changed to QB64 program
#10
A quick hack is better than a quack hick... Hey where is Steve, anyway?


PEEK / POKE won't help, either.

    Def Seg = 0
    i% = Peek(1047) Mod 16
    If InStr(Chr$(1) + Chr$(2) + Chr$(5) + Chr$(6) + Chr$(9) + Chr$(10), Chr$(i%)) Then tx.shift = -1 Else tx.shift = 0
    If tx.shift Then Print "Different Shift same results."
    Def Seg

So it looks like unless someone can come up with a way for QB64 to poll the keyboard when the QB64 window is not active then anyone wanting this ability will need to write a Windows only routine using Win32 API keyboard functions. I had to do that for mouse routines when the program window was out of focus. It worked perfectly, but Linux and Mac users were not be able to use it.

Pete
Fake News + Phony Politicians = Real Problems

Reply


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



Users browsing this thread: 9 Guest(s)