Trapping two keys
#9
Interesting about _KEYCLEAR. I never use _KEYDOWN, oh, there was that one time, but I didn't like it, so back to INKEY$. I like using _KEYCLEAR with INKEY$. It used to be a WHILE:WEND snippet was needed, or a null variable assigned to INKEY$ to have this type of effect on the key buffer. Nice to know it isn't needed with _KEYDOWN, even though I probably won't be using it in my own routines.

@PhilOfPerth just be aware in your attempt with ky values, they won't add up properly unless you take the ones held down out of the next iteration. If you've ever watched The Big Band Theory, this is where Sheldon Cooper says have, "Fun with Flags!" In the code I wrote for you in post #7, demo 2 in the single coded example uses (2) flags to control the ky addition process and to limit the print statement to just one printing while the key combo is held down. Demo one uses (1) flag variable in a more simplistic manner, just to recognize one operation was performed and no others will occur until the key combo is released.

Pete
Reply


Messages In This Thread
Trapping two keys - by PhilOfPerth - 10-01-2022, 01:52 AM
RE: Trapping two keys - by bplus - 10-01-2022, 01:59 AM
RE: Trapping two keys - by PhilOfPerth - 10-01-2022, 02:08 AM
RE: Trapping two keys - by bplus - 10-01-2022, 02:26 AM
RE: Trapping two keys - by Pete - 10-01-2022, 02:38 AM
RE: Trapping two keys - by PhilOfPerth - 10-01-2022, 08:05 AM
RE: Trapping two keys - by Pete - 10-01-2022, 01:07 PM
RE: Trapping two keys - by bplus - 10-01-2022, 03:33 PM
RE: Trapping two keys - by Pete - 10-01-2022, 04:19 PM
RE: Trapping two keys - by PhilOfPerth - 10-01-2022, 11:24 PM
RE: Trapping two keys - by PhilOfPerth - 10-02-2022, 12:04 AM
RE: Trapping two keys - by bplus - 10-02-2022, 01:41 AM
RE: Trapping two keys - by Pete - 10-02-2022, 02:00 AM
RE: Trapping two keys - by PhilOfPerth - 10-02-2022, 02:34 AM
RE: Trapping two keys - by bplus - 10-02-2022, 05:20 PM
RE: Trapping two keys - by mnrvovrfc - 10-02-2022, 07:51 PM
RE: Trapping two keys - by Pete - 10-02-2022, 05:51 PM
RE: Trapping two keys - by James D Jarvis - 10-02-2022, 07:56 PM
RE: Trapping two keys - by bplus - 10-02-2022, 07:58 PM



Users browsing this thread: 6 Guest(s)