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

 Syntax

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

 Arguments:

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

 Returns:

      <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

 Description:

      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
      character.

 Examples:

      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: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson