Author Topic: Re: KeyCodes  (Read 643 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: KeyCodes
« on: March 18, 2020, 11:56:55 pm »
I would use _KEYDOWN to check if Shift, Alt, or Ctrl are being pressed.

IF _KEYDOWN(100305) OR _KEYDOWN(100306) THEN CtrlOn = -1 ELSE CtrlOn = 0

This would work independently of INKEY$ or _KEYHIT.

« Last Edit: March 18, 2020, 11:58:20 pm by bplus »

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: KeyCodes
« Reply #1 on: March 22, 2020, 12:25:58 pm »
I know this if of little or no help, but....

In that case you will need to use the actual interrupt for the keyboard to get the codes directly. Pretty much writing your own keyboard handler. I think the old ABC repository used to have examples on it. not sure if you can even still find that today. unless you already have a copy.
Granted after becoming radioactive I only have a half-life!