Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month! GT_LIB v1.0 Reference Guide Release 1.0 - <b>find the real value of an alt key combination</b> [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Find the real value of an ALT key combination


        GT_Alt( <cNormLetter> | <nAltInkey> ) --> <nAltInkey> | <cNormLetter>


      <cNormLetter> is a character that can have an ALT combination.
      <nAltInkey>   is a key press that could be an ALT combination.


      <cNormLetter> is the upper case character that relates to the
                    passed <nAltInkey> value. Default ""
      <nAltInkey>   is the inkey() value of the key that relates to
                    and ALT'ified character. Perhaps the example will
                    explain better :-). Default 0


      Function used to find out the real value of an ALT combination key.
      The problem with the Inkey() function is the ALT keys are not just
      a table offset from the 'real' keys ( like upper case and lower case
      keys are).

      This simple function will return either the character value of an
      ALT key inkey() value, or the ALT key inkey() value of a passed


      GT_Alt( K_ALT_A ) --> "A"
      GT_Alt( "A" ) --> K_ALT_A

      GT_Alt( 0 ) --> ""
      GT_Alt( "" ) --> 0

      GT_Alt( K_ALT_Z ) --> "Z"
      GT_Alt( K_ALT_C ) --> "C"

      GT_Alt( "z" ) --> K_ALT_Z
      GT_Alt( "c" ) --> K_ALT_C

 Source: GT_ALT.PRG

 Author:  Phillip Hamlyn

Online resources provided by: --- NG 2 HTML conversion by Dave Pearson