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