home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MODEM / UWPC201.ZIP / UW-SRC.ZIP / KEYS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-11-03  |  3.7 KB  |  100 lines

  1. /*-------------------------------------------------------------------------
  2.  
  3.   KEYS.H - Declarations for the keyboard handling for Unix Windows.
  4.  
  5.     This file is part of UW/PC - a multi-window comms package for the PC.
  6.     Copyright (C) 1990-1991  Rhys Weatherley
  7.  
  8.     This program is free software; you can redistribute it and/or modify
  9.     it under the terms of the GNU General Public License as published by
  10.     the Free Software Foundation; either version 1, or (at your option)
  11.     any later version.
  12.  
  13.     This program is distributed in the hope that it will be useful,
  14.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.     GNU General Public License for more details.
  17.  
  18.     You should have received a copy of the GNU General Public License
  19.     along with this program; if not, write to the Free Software
  20.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22.   Revision History:
  23.   ================
  24.  
  25.    Version  DD/MM/YY  By  Description
  26.    -------  --------  --  ----------------------------------------------
  27.      1.0    20/12/90  RW  Original Version of KEYS.H
  28.      1.1    01/01/91  RW  Clean up and remove __PROTO__
  29.      1.2    01/01/91  RW  Add trapping of INT 1B to disable CTRL-BREAK
  30.      1.3    23/03/91  RW  Convert to C++ for Version 2.00 of UW/PC.
  31.      1.4    05/05/91  RW  Process function key expansions.
  32.      1.5    08/06/91  RW  Add keys for clipboard operation.
  33.      1.6    27/09/91  RW  Add ALT-W for "next window" key.
  34.  
  35.   You may contact the author by:
  36.   =============================
  37.  
  38.    e-mail: rhys@cs.uq.oz.au
  39.      mail: Rhys Weatherley
  40.        5 Horizon Drive
  41.        Jamboree Heights
  42.        Queensland 4074
  43.        Australia
  44.  
  45. -------------------------------------------------------------------------*/
  46.  
  47. #ifndef __KEYS_H__
  48. #define    __KEYS_H__
  49.  
  50. /* Define some special key codes that will be returned from GetKeyPress */
  51. #define ALT_WIND_NUM(n)        ((0x77 + (n)) << 8)
  52. #define ALT_GET_NUM(key)    (((key >> 8) & 255) - 0x77)
  53. #define QUIT_KEY        0x2D00    /* ALT-X */
  54. #define QUIT_KEY2        0x1000    /* ALT-Q */
  55. #ifndef    UWPC_WINDOWS
  56. /* The <windows.h> file has already defined HELP_KEY for something else */
  57. #define HELP_KEY        0x2C00    /* ALT-Z */
  58. #endif    /* UWPC_WINDOWS */
  59. #define EXIT_KEY        0x1200    /* ALT-E - exit UW */
  60. #define HANGUP_KEY        0x2300    /* ALT-H */
  61. #define BREAK_KEY        0x3000    /* ALT-B */
  62. #define NEW_KEY            0x3100    /* ALT-N */
  63. #define KILL_KEY        0x2500    /* ALT-K */
  64. #define JUMP_DOS_KEY        0x2400    /* ALT-J */
  65. #define INIT_KEY        0x1700    /* ALT-I */
  66. #define START_KEY        0x1600    /* ALT-U */
  67. #define UPLOAD_KEY        0x1F00    /* ALT-S */
  68. #define DOWNLOAD_KEY        0x1300    /* ALT-R */
  69. #define    CUT_KEY            0x2E00    /* ALT-C */
  70. #define    PASTE_KEY        0x1900    /* ALT-P */
  71. #define    NEXTWIN_KEY        0x1100    /* ALT-W and ALT-0 */
  72. #define CURSOR_UP        0x4800
  73. #define CURSOR_DOWN        0x5000
  74. #define CURSOR_LEFT        0x4B00
  75. #define CURSOR_RIGHT        0x4D00
  76. #define CURSOR_HOME        0x4700
  77. #define CURSOR_END        0x4F00
  78. #define CURSOR_PGUP        0x4900
  79. #define CURSOR_PGDN        0x5100
  80. #define CURSOR_INS        0x5200
  81. #define CURSOR_DEL        0x7F    /* This module translates this key */
  82. #define DIAL_KEY        0x2000    /* ALT-D */
  83. #define UWFTP_KEY        0x2100    /* ALT-F */
  84. #define CAPTURE_KEY        0x2600    /* ALT-L */
  85. #define    MAIL_KEY        0x3200    /* ALT-M */
  86. #define    STTY_KEY        0x1400    /* ALT-T */
  87. #define    PAUSE_KEY        -2    /* 1/2 second pause */
  88.  
  89. /* Initialise the keyboard handling system */
  90. void    InitKeyboard    (void);
  91.  
  92. /* Terminate the keyboard handling system */
  93. void    TermKeyboard    (void);
  94.  
  95. /* Return the user's next keypress, or -1 if none available */
  96. /* Returns 0-255 for the ASCII values, or extended keycode. */
  97. int    GetKeyPress    (void);
  98.  
  99. #endif    /* __KEYS_H__ */
  100.