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
Shoot first and shoot people who ask questions, later.
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

Possibly Related Threads…
Thread Author Replies Views Last Post
  kill "filename.ext" = shift-delete doppler 11 433 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 822 03-26-2023, 03:59 PM
Last Post: bplus
  Tough to ID key sequences... Pete 4 970 12-04-2022, 04:57 AM
Last Post: Pete

Forum Jump:


Users browsing this thread: 1 Guest(s)