Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ways to trap function key
#4
Don't think I ever used the Key method in Eric's first example. So it was news to me no matter long it's been around. Thanks Eric!

So that makes 4 ways to trap a key:
1. Inkey$
2. KeyHit
3. Keydown
4. Key

SmallBASIC had a way to associate a Key to a subroutine so that routine would execute when the Key was pressed, maybe ON KEY for us?

Just looked it up: Yes! On Key(1) would trap the F1 key and send you to a GoSub or Sub you setup on same command. Numbers 1-10 dedicated to Function keys then 11-14? the arrow keys, this old stuff probably came with QB4.5?
b = b + ...
Reply


Messages In This Thread
Ways to trap function key - by eoredson - 01-20-2024, 06:55 AM
RE: Ways to trap function key - by PhilOfPerth - 01-20-2024, 10:00 AM
RE: Ways to trap function key - by SMcNeill - 01-20-2024, 12:28 PM
RE: Ways to trap function key - by bplus - 01-20-2024, 02:01 PM
RE: Ways to trap function key - by TerryRitchie - 01-20-2024, 02:26 PM
RE: Ways to trap function key - by bplus - 01-20-2024, 03:46 PM
RE: Ways to trap function key - by SMcNeill - 01-20-2024, 06:25 PM



Users browsing this thread: 2 Guest(s)