08-14-2024, 01:21 AM
(This post was last modified: 08-14-2024, 01:22 AM by TerryRitchie.)
(08-13-2024, 11:28 PM)SMcNeill Wrote:Yeah, I have to agree. Since discovering _KEYHIT, _KEYDOWN, and _BUTTON I rarely use INKEY$ any longer. The main problem I have with INKEY$ is that it is tied to the BIOS keyboard rate which simply can't be used for controlling real-time objects on the screen for instance.(08-13-2024, 11:23 PM)Pete Wrote: Still not a fan of _KEYHIT because part of efficiency to me is how fast I can code. _KEYHIT slows me down. It's not intuitive like INKEY$.
Actually INKEY$ would be just about perfect for my uses, except for the nagging problem it has identifying when a key is released. It gives false positives and can be problematic without coding a workaround routine, which really is inefficient.
I'm glad we have _KEYHIT and the other QB64 key statements but I'm not sure I will ever get comfortable using them. I don't have youth on my side like Steve. Oh, I won't go into sympathy because us old folks do get plenty of sympathy for that, but Steve, once again beats me in this department, as studies have proven time and time again that sympathy for ugly outweighs age every time!
Pete
I find _Keyhit utterly intuitive anymore.
Quick, what's the INKEY$ key combos for Left Arrow, F1 and Delete?
Want me to give them to you instantly in the IDE for _KeyHit?
CTRL-K, Left Arrow
CTRL-K, F1
CTRL-K, Delete
Just press CTRL-K and then the key, the IDE automatically returns the associated value with that key back into your program where your cursor is located.
Now, what can be any more intuitive than that??
Don't get me wrong, INKEY$ is still extremely useful for things like menu selection, etc.. but for gaming _KEYHIT, _KEYDOWN, and _BUTTON are the way to go.
And the CTRL-K shortcut ... amazing addition to the IDE ... I use it all the time.