[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FUNCTION RRLASTKEY() *new*
Short:
------
RRLASTKEY() Retrieve the last key handled by ratapplykey()
Returns:
--------
<nLastKey> => last key handled by ratapplykey()
Syntax:
-------
RRLASTKEY()
Description:
------------
Returns the last key - including pseudo keys - handled by
RatApplyKey().
The [nRmKey] and [aLmKeys] parameters of RAT_READ() allow
emulation of keypresses. The [nRmKey] determines what key is
emulated when the right mouse button is pressed. The [aLmKeys]
array contains key emulations to be used for a set of screen
hot areas for left mouse button clicks. In both cases, the
ascii key code is passed to RatApplyKey() to handle. However,
the keys ARE NOT STUFFED INTO THE KEYBOARD, and thus are not
retrievable through LASTKEY(). The reason, by the way, that they
are not stuffed into the keyboard, is that some keys cannot be
stuffed with the KEYBOARD command ( i.e. ALT-F10 or -39 )
After a number of requests to be able to tell what key was
pressed last when exiting a read, even when it is an interpreted
key based on a mouse click, I've added this function. It will return
the last key handled by RatApplyKey(), even if the key is based on
a mouse click. If the last event is a mouse event that does not
translate into a key value, it will return either 400 for left
mouse click, or 500 for right mouse click.
Examples:
---------
RAT_READ(getlist,...)
if RRLASTKEY()==27
* escape was pressed or mouse right button was pressed
endif
Notes:
-------
Source:
-------
S_RREAD.PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson