[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
##############################################################################
###+---------+################################################################
#+-| KEY_INT |------------------------------------+###########################
#| +---------+ Stuffs the keyboard with key_value |###########################
#+------------------------------------------------+###########################
##############################################################################
##############################################################################
#+--| Summary |------------+##################################################
#|     #INCLUDE io.hdr     |##################################################
#+-------------------------+##################################################
##############################################################################
##############################################################################
#+--| Syntax |------------------------------+#################################
#|     PROCEDURE key_int PROTOTYPE          |#################################
#|      PARAMETERS VALUE UINT key_value     |#################################
#+------------------------------------------+#################################
##############################################################################
##############################################################################
#########+---| Description |-----------------------------------------+########
#########| The key_int procedure stuffs the keyboard with key_value. |########
#########+-----------------------------------------------------------+########
##############################################################################
##############################################################################
###########+---| Design |------------------------------------------+##########
###########| Use key_int to stuff the keyboard with function keys, |##########
###########| control keys or cursor keys.  Use successive key_int  |##########
###########| calls to insert complex keystrokes into the keyboard  |##########
###########| buffer.                                               |##########
###########| ----------------------------------------------------- |##########
###########| The command CLEAR TYPEAHEAD clears all pending        |##########
###########| keystrokes from the keyboard buffer.                  |##########
###########+-------------------------------------------------------+##########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| *    Stuff a down arrow into the keyboard buffer         |#########
#########| *    before performing an edit.                          |#########
#########|                                                          |#########
#########| DO key_int WITH &K_DOWN                                  |#########
#########| EDIT                                                     |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| *    Use key_int to restore the cursor to the            |#########
#########| *    HOME position when a VALID filter falls.            |#########
#########|                                                          |#########
#########| FUNCTION LOGICAL my_valid                                |#########
#########|     {...}                                                |#########
#########|     IF valid_fails                                       |#########
#########|         KEY_INT( &K_HOME )                               |#########
#########|         RETURN .F.                                       |#########
#########|     ENDIF                                                |#########
#########|     RETURN .T.                                           |#########
#########| ENDPRO                                                   |#########
#########|                                                          |#########
#########|     {...}                                                |#########
#########|     @ x,y GET v VALID my_valid()                         |#########
#########+----------------------------------------------------------+#########
##############################################################################

See Also: CLEAR TYPEAHEAD keyboard
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson