[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  oWin:keyChar( <nKey>, <nKeyFlag> ) -> <nil>

------------------------------------------------------------------------------


 PARAMETER:

   <nKey>      The value of the pressed key

   <nKeyFlags> Keyboard status


 DESCRIPTION:

  This method handles all the WM_CHAR messages that Windows sends to
  our window. Recall that this messages are already translated by windows
  so that only non-system and non-control keys arrive here ( keys that 
  produce a char in the keyboard buffer ).
  This means, don't start looking for Cursor keys here, 'cause you will 
  wait forever. To catch those, use the method ::KeyDown().

  If you have defined SETKEY keys, then the appropriate actionblock
  is evaluted here, supplied with procName() and procLine() info
  as parameter. Then the bKeyChar block is evaluated with <nKey> and 
  <nKeyFlag>

  Please press  Related Topics:  and select  WM_KEY  for detailed 
  informations about the Topic and the parameters


 EXAMPLE:

     +-------------------------------------------------------------+
     |  /* Trap the "S" key */                                     |
     |  oWin:bKeyChar := {|nk,nf| MyKeyChar( nk, nf )}             |
     |  [ more code .. ]                                           |
     |                                                             |
     |  FUNCTION MyKeyChar( nKey, nFlags )                         |
     |  LOCAL ;                                                    |
     |     cKey := UPPER( CHR( nKey ))                             |
     |     IF cKey == "S"                                          |
     |        MsgInfo( "Got your S" )                              |
     |        RETURN 1                                             |
     |     ENDIF                                                   |
     |  RETURN 0                                                   |
     |                                                             |
     +-------------------------------------------------------------+



 !seealso:"wm.eho:WM_KEY" "bKeyChar" "KeyDown"


This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson