home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / viscobv7.zip / vac22os2 / ibmcobol / macros / moveview.lx < prev    next >
Text File  |  1998-02-24  |  694b  |  26 lines

  1. /* This macro provides is invoked after pressing F1 */
  2. /* changes focus based on arrow key direction */
  3.  
  4. 'keyread'  /* wait for key */
  5. 'extract lastkey'
  6.  
  7. select
  8.   when lastkey = "UP" then do
  9.                  'LP_PREVRING'
  10.                   end
  11.   when lastkey = "DOWN" then do
  12.                  'LP_NEXTRING'
  13.                   end
  14.   when lastkey = "RIGHT" then do
  15.                  'LP_NEXTRING'
  16.                   end
  17.   when lastkey = "LEFT" then do
  18.                  'LP_PREVRING'
  19.                   end
  20.   when lastkey = "ESC" then do
  21.                   MSG 'Command canceled'
  22.                   end
  23.  
  24.   otherwise MSG 'You must choose an arrow key to change focus'
  25.       end
  26.