• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

plevent.h

Go to the documentation of this file.
00001 // $Id: plevent.h 11283 2010-10-28 22:38:29Z airwin $
00002 //
00003 //  Input event (especially keyboard) definitions for use from plplot
00004 //  event handlers.
00005 //
00006 //  Key definitions are taken from the X11/keysymdef.h include file, with
00007 //  some changes:
00008 //      - only the control keys are retained
00009 //      - the XK prefix has been changed to PLK
00010 //      - control keys with ASCII equivalents use the ASCII code
00011 //
00012 //  By using the ASCII equivalent (if it exists) for all control keys, it
00013 //  is easier to handle keyboard input from any device which is ASCII based.
00014 //  Devices which use some other kind of key encoding must translate the raw
00015 //  keycodes to those used here.
00016 //
00017 
00018 #ifndef __PLEVENT_H__
00019 #define __PLEVENT_H__
00020 
00021 // Key definitions
00022 
00023 //--------------------------------------------------------------------------
00024 // Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
00025 // and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
00026 //
00027 //                      All Rights Reserved
00028 //
00029 // Permission to use, copy, modify, and distribute this software and its
00030 // documentation for any purpose and without fee is hereby granted,
00031 // provided that the above copyright notice appear in all copies and that
00032 // both that copyright notice and this permission notice appear in
00033 // supporting documentation, and that the names of Digital or MIT not be
00034 // used in advertising or publicity pertaining to distribution of the
00035 // software without specific, written prior permission.
00036 //
00037 // DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
00038 // ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
00039 // DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
00040 // ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
00041 // WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
00042 // ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
00043 // SOFTWARE.
00044 //
00045 //--------------------------------------------------------------------------
00046 
00047 // Miscellaneous control keys, those with ASCII equivalents
00048 
00049 #define PLK_BackSpace    0x08           // back space, back char
00050 #define PLK_Tab          0x09
00051 #define PLK_Linefeed     0x0A           // Linefeed, LF
00052 #define PLK_Return       0x0D           // Return, enter
00053 #define PLK_Escape       0x1B
00054 #define PLK_Delete       0xFF           // Delete, rubout
00055 
00056 // Those without ASCII equivalents
00057 
00058 #define PLK_Clear          0xFF0B
00059 #define PLK_Pause          0xFF13       // Pause, hold
00060 #define PLK_Scroll_Lock    0xFF14
00061 
00062 // Cursor control & motion
00063 
00064 #define PLK_Home     0xFF50
00065 #define PLK_Left     0xFF51             // Move left, left arrow
00066 #define PLK_Up       0xFF52             // Move up, up arrow
00067 #define PLK_Right    0xFF53             // Move right, right arrow
00068 #define PLK_Down     0xFF54             // Move down, down arrow
00069 #define PLK_Prior    0xFF55             // Prior, previous (Page Up)
00070 #define PLK_Next     0xFF56             // Next (Page Down)
00071 #define PLK_End      0xFF57             // EOL
00072 #define PLK_Begin    0xFF58             // BOL
00073 
00074 // Misc Functions
00075 
00076 #define PLK_Select           0xFF60     // Select, mark
00077 #define PLK_Print            0xFF61
00078 #define PLK_Execute          0xFF62     // Execute, run, do
00079 #define PLK_Insert           0xFF63     // Insert, insert here
00080 #define PLK_Undo             0xFF65     // Undo, oops
00081 #define PLK_Redo             0xFF66     // redo, again
00082 #define PLK_Menu             0xFF67
00083 #define PLK_Find             0xFF68     // Find, search
00084 #define PLK_Cancel           0xFF69     // Cancel, stop, abort, exit
00085 #define PLK_Help             0xFF6A     // Help, ?
00086 #define PLK_Break            0xFF6B
00087 #define PLK_Mode_switch      0xFF7E     // Character set switch
00088 #define PLK_script_switch    0xFF7E     // Alias for mode_switch
00089 #define PLK_Num_Lock         0xFF7F
00090 
00091 // Keypad Functions, keypad numbers cleverly chosen to map to ascii
00092 
00093 #define PLK_KP_Space        0xFF80      // space
00094 #define PLK_KP_Tab          0xFF89
00095 #define PLK_KP_Enter        0xFF8D      // enter
00096 #define PLK_KP_F1           0xFF91      // PF1, KP_A, ...
00097 #define PLK_KP_F2           0xFF92
00098 #define PLK_KP_F3           0xFF93
00099 #define PLK_KP_F4           0xFF94
00100 #define PLK_KP_Equal        0xFFBD      // equals
00101 #define PLK_KP_Multiply     0xFFAA
00102 #define PLK_KP_Add          0xFFAB
00103 #define PLK_KP_Separator    0xFFAC      // separator, often comma
00104 #define PLK_KP_Subtract     0xFFAD
00105 #define PLK_KP_Decimal      0xFFAE
00106 #define PLK_KP_Divide       0xFFAF
00107 
00108 #define PLK_KP_0            0xFFB0
00109 #define PLK_KP_1            0xFFB1
00110 #define PLK_KP_2            0xFFB2
00111 #define PLK_KP_3            0xFFB3
00112 #define PLK_KP_4            0xFFB4
00113 #define PLK_KP_5            0xFFB5
00114 #define PLK_KP_6            0xFFB6
00115 #define PLK_KP_7            0xFFB7
00116 #define PLK_KP_8            0xFFB8
00117 #define PLK_KP_9            0xFFB9
00118 
00119 //
00120 // Auxilliary Functions; note the duplicate definitions for left and right
00121 // function keys;  Sun keyboards and a few other manufactures have such
00122 // function key groups on the left and/or right sides of the keyboard.
00123 // We've not found a keyboard with more than 35 function keys total.
00124 //
00125 
00126 #define PLK_F1     0xFFBE
00127 #define PLK_F2     0xFFBF
00128 #define PLK_F3     0xFFC0
00129 #define PLK_F4     0xFFC1
00130 #define PLK_F5     0xFFC2
00131 #define PLK_F6     0xFFC3
00132 #define PLK_F7     0xFFC4
00133 #define PLK_F8     0xFFC5
00134 #define PLK_F9     0xFFC6
00135 #define PLK_F10    0xFFC7
00136 #define PLK_F11    0xFFC8
00137 #define PLK_L1     0xFFC8
00138 #define PLK_F12    0xFFC9
00139 #define PLK_L2     0xFFC9
00140 #define PLK_F13    0xFFCA
00141 #define PLK_L3     0xFFCA
00142 #define PLK_F14    0xFFCB
00143 #define PLK_L4     0xFFCB
00144 #define PLK_F15    0xFFCC
00145 #define PLK_L5     0xFFCC
00146 #define PLK_F16    0xFFCD
00147 #define PLK_L6     0xFFCD
00148 #define PLK_F17    0xFFCE
00149 #define PLK_L7     0xFFCE
00150 #define PLK_F18    0xFFCF
00151 #define PLK_L8     0xFFCF
00152 #define PLK_F19    0xFFD0
00153 #define PLK_L9     0xFFD0
00154 #define PLK_F20    0xFFD1
00155 #define PLK_L10    0xFFD1
00156 #define PLK_F21    0xFFD2
00157 #define PLK_R1     0xFFD2
00158 #define PLK_F22    0xFFD3
00159 #define PLK_R2     0xFFD3
00160 #define PLK_F23    0xFFD4
00161 #define PLK_R3     0xFFD4
00162 #define PLK_F24    0xFFD5
00163 #define PLK_R4     0xFFD5
00164 #define PLK_F25    0xFFD6
00165 #define PLK_R5     0xFFD6
00166 #define PLK_F26    0xFFD7
00167 #define PLK_R6     0xFFD7
00168 #define PLK_F27    0xFFD8
00169 #define PLK_R7     0xFFD8
00170 #define PLK_F28    0xFFD9
00171 #define PLK_R8     0xFFD9
00172 #define PLK_F29    0xFFDA
00173 #define PLK_R9     0xFFDA
00174 #define PLK_F30    0xFFDB
00175 #define PLK_R10    0xFFDB
00176 #define PLK_F31    0xFFDC
00177 #define PLK_R11    0xFFDC
00178 #define PLK_F32    0xFFDD
00179 #define PLK_R12    0xFFDD
00180 #define PLK_R13    0xFFDE
00181 #define PLK_F33    0xFFDE
00182 #define PLK_F34    0xFFDF
00183 #define PLK_R14    0xFFDF
00184 #define PLK_F35    0xFFE0
00185 #define PLK_R15    0xFFE0
00186 
00187 // Modifiers
00188 
00189 #define PLK_Shift_L       0xFFE1        // Left shift
00190 #define PLK_Shift_R       0xFFE2        // Right shift
00191 #define PLK_Control_L     0xFFE3        // Left control
00192 #define PLK_Control_R     0xFFE4        // Right control
00193 #define PLK_Caps_Lock     0xFFE5        // Caps lock
00194 #define PLK_Shift_Lock    0xFFE6        // Shift lock
00195 
00196 #define PLK_Meta_L        0xFFE7        // Left meta
00197 #define PLK_Meta_R        0xFFE8        // Right meta
00198 #define PLK_Alt_L         0xFFE9        // Left alt
00199 #define PLK_Alt_R         0xFFEA        // Right alt
00200 #define PLK_Super_L       0xFFEB        // Left super
00201 #define PLK_Super_R       0xFFEC        // Right super
00202 #define PLK_Hyper_L       0xFFED        // Left hyper
00203 #define PLK_Hyper_R       0xFFEE        // Right hyper
00204 
00205 #endif  // __PLEVENT_H__

Generated on Wed Oct 12 2011 20:42:22 for PLplot by  doxygen 1.7.1