SP_RRLASTKEY

RRLASTKEY()

  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 K_MOUSELEFT for left
  mouse click, or K_MOUSERIGHT 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

See also : RAT_READ()

 

One response to “SP_RRLASTKEY

  1. Pingback: SP Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.