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?
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
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

Possibly Related Threads…
Thread Author Replies Views Last Post
Star Suggestion for new REPLACE$() function zaadstra 3 265 01-26-2026, 05:11 PM
Last Post: grymmjack
  Any other way to ignore the Alt key using the INKEY method? Pete 24 1,456 12-31-2025, 05:24 PM
Last Post: Pete
  Is there a menu function? Mad Axeman 17 1,129 12-17-2025, 04:43 AM
Last Post: SMcNeill
  Stopping repeated mouse-key press PhilOfPerth 8 876 09-02-2025, 11:28 PM
Last Post: Pete
  error on function returning _mem Herve 5 698 07-05-2025, 08:06 PM
Last Post: hsiangch_ong

Forum Jump:


Users browsing this thread: 1 Guest(s)