Menu

Support for Twelve Function Keys?

Tom Lake
2021-05-22
2021-05-31
  • Tom Lake

    Tom Lake - 2021-05-22

    The last couple versions of IBM BASIC and BASICA (ver. 3.20 and 3.30) and Compaq BASIC supported all 12 function keys. Would it be possible to let PC-BASIC do that as well?

     
    • Rob Hagemans

      Rob Hagemans - 2021-05-28

      Hi Tom, that's interesting! At the moment F11 and F12 are only supported in Tandy mode, and even then it clashes a bit as these keys are used to access emulator functionality. I think the Compaq was a much more regular PC/AT clone. Would you know of any documentation (e.g. online links or pdfs or some such) for these versions of Compaq BASIC? I'm wondering if it has more extended features, it may be possible to include some of its features in a future version. Though admittedly I haven't had much time to invest in PC-BASIC recently.

       
  • Tom Lake

    Tom Lake - 2021-05-31

    Compaq BASIC was an exact clone of IBM BASICA. KEY(30) was F11 and KEY(31) was F12 in the KEY(n) and ON KEY(n) statements. If n was 15-25 then you could trap other keys by CHR$(KBflag)+CHR$(scan code).
    KBflag is:
    Caps Lock Inactive = &H0
    Caps Lock Active = &H40
    Num Lock Inactive = &H0
    Num Lock Active = &H20
    Alt = &H08
    Ctrl = &H04
    Left Shift = &H02
    Right Shift = &H01
    Duplicate Key = &H80

    Scan code is the usual scan code of the keys on the keyboard.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.