09-17-2024, 08:10 PM
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
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
Shoot first and shoot people who ask questions, later.