PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: Keyboard.h * 00003 * 00004 * Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PixelLight is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLINPUT_KEYBOARD_H__ 00024 #define __PLINPUT_KEYBOARD_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLInput/Input/Devices/Device.h" 00032 #include "PLInput/Input/Controls/Button.h" 00033 00034 00035 //[-------------------------------------------------------] 00036 //[ Namespace ] 00037 //[-------------------------------------------------------] 00038 namespace PLInput { 00039 00040 00041 //[-------------------------------------------------------] 00042 //[ Classes ] 00043 //[-------------------------------------------------------] 00044 /** 00045 * @brief 00046 * Keyboard device 00047 * 00048 * @remarks 00049 * This class supports the following device backend types: 00050 * - UpdateDevice 00051 */ 00052 class Keyboard : public Device { 00053 00054 00055 //[-------------------------------------------------------] 00056 //[ Class definition ] 00057 //[-------------------------------------------------------] 00058 pl_class(PLINPUT_RTTI_EXPORT, Keyboard, "PLInput", PLInput::Device, "Keyboard input controller") 00059 pl_class_end 00060 00061 00062 //[-------------------------------------------------------] 00063 //[ Controller definition ] 00064 //[-------------------------------------------------------] 00065 public: 00066 PLInput::Button Backspace; /**< Backspace */ 00067 PLInput::Button Tab; /**< Tab */ 00068 PLInput::Button Clear; /**< Clear (not available everywhere) */ 00069 PLInput::Button Return; /**< Return (often the same as "Enter") */ 00070 PLInput::Button Shift; /**< Shift */ 00071 PLInput::Button Control; /**< Control ("Ctrl") */ 00072 PLInput::Button Alt; /**< Alt */ 00073 PLInput::Button Pause; /**< Pause */ 00074 PLInput::Button CapsLock; /**< Caps lock */ 00075 PLInput::Button Escape; /**< Escape */ 00076 PLInput::Button Space; /**< Space */ 00077 PLInput::Button PageUp; /**< Page up */ 00078 PLInput::Button PageDown; /**< Page down */ 00079 PLInput::Button End; /**< End */ 00080 PLInput::Button Home; /**< Home */ 00081 PLInput::Button Left; /**< Left arrow */ 00082 PLInput::Button Up; /**< Up arrow */ 00083 PLInput::Button Right; /**< Right arrow */ 00084 PLInput::Button Down; /**< Down arrow */ 00085 PLInput::Button Select; /**< Select (not available everywhere) */ 00086 PLInput::Button Execute; /**< Execute (not available everywhere) */ 00087 PLInput::Button Print; /**< Print screen */ 00088 PLInput::Button Insert; /**< Insert */ 00089 PLInput::Button Delete; /**< Delete */ 00090 PLInput::Button Help; /**< Help (not available everywhere) */ 00091 PLInput::Button Key0; /**< 0 (control name is "0") */ 00092 PLInput::Button Key1; /**< 1 (control name is "1") */ 00093 PLInput::Button Key2; /**< 2 (control name is "2") */ 00094 PLInput::Button Key3; /**< 3 (control name is "3") */ 00095 PLInput::Button Key4; /**< 4 (control name is "4") */ 00096 PLInput::Button Key5; /**< 5 (control name is "5") */ 00097 PLInput::Button Key6; /**< 6 (control name is "6") */ 00098 PLInput::Button Key7; /**< 7 (control name is "7") */ 00099 PLInput::Button Key8; /**< 8 (control name is "8") */ 00100 PLInput::Button Key9; /**< 9 (control name is "9") */ 00101 PLInput::Button A; /**< A */ 00102 PLInput::Button B; /**< B */ 00103 PLInput::Button C; /**< C */ 00104 PLInput::Button D; /**< D */ 00105 PLInput::Button E; /**< E */ 00106 PLInput::Button F; /**< F */ 00107 PLInput::Button G; /**< G */ 00108 PLInput::Button H; /**< H */ 00109 PLInput::Button I; /**< I */ 00110 PLInput::Button J; /**< J */ 00111 PLInput::Button K; /**< K */ 00112 PLInput::Button L; /**< L */ 00113 PLInput::Button M; /**< M */ 00114 PLInput::Button N; /**< N */ 00115 PLInput::Button O; /**< O */ 00116 PLInput::Button P; /**< P */ 00117 PLInput::Button Q; /**< Q */ 00118 PLInput::Button R; /**< R */ 00119 PLInput::Button S; /**< S */ 00120 PLInput::Button T; /**< T */ 00121 PLInput::Button U; /**< U */ 00122 PLInput::Button V; /**< V */ 00123 PLInput::Button W; /**< W */ 00124 PLInput::Button X; /**< X */ 00125 PLInput::Button Y; /**< Y */ 00126 PLInput::Button Z; /**< Z */ 00127 PLInput::Button Numpad0; /**< Numeric keypad 0 */ 00128 PLInput::Button Numpad1; /**< Numeric keypad 1 */ 00129 PLInput::Button Numpad2; /**< Numeric keypad 2 */ 00130 PLInput::Button Numpad3; /**< Numeric keypad 3 */ 00131 PLInput::Button Numpad4; /**< Numeric keypad 4 */ 00132 PLInput::Button Numpad5; /**< Numeric keypad 5 */ 00133 PLInput::Button Numpad6; /**< Numeric keypad 6 */ 00134 PLInput::Button Numpad7; /**< Numeric keypad 7 */ 00135 PLInput::Button Numpad8; /**< Numeric keypad 8 */ 00136 PLInput::Button Numpad9; /**< Numeric keypad 9 */ 00137 PLInput::Button NumpadMultiply; /**< Numeric keypad "Multiply" */ 00138 PLInput::Button NumpadAdd; /**< Numeric keypad "Add" */ 00139 PLInput::Button NumpadSeparator; /**< Numeric keypad "Separator" */ 00140 PLInput::Button NumpadSubtract; /**< Numeric keypad "Subtract" */ 00141 PLInput::Button NumpadDecimal; /**< Numeric keypad "Decimal" */ 00142 PLInput::Button NumpadDivide; /**< Numeric keypad "Divide" */ 00143 PLInput::Button F1; /**< F1 */ 00144 PLInput::Button F2; /**< F2 */ 00145 PLInput::Button F3; /**< F3 */ 00146 PLInput::Button F4; /**< F4 */ 00147 PLInput::Button F5; /**< F5 */ 00148 PLInput::Button F6; /**< F6 */ 00149 PLInput::Button F7; /**< F7 */ 00150 PLInput::Button F8; /**< F8 */ 00151 PLInput::Button F9; /**< F9 */ 00152 PLInput::Button F10; /**< F10 */ 00153 PLInput::Button F11; /**< F11 */ 00154 PLInput::Button F12; /**< F12 */ 00155 PLInput::Button NumLock; /**< Num lock */ 00156 PLInput::Button ScrollLock; /**< Scroll lock */ 00157 PLInput::Button Circumflex; /**< Circumflex (^) */ 00158 00159 00160 //[-------------------------------------------------------] 00161 //[ Public functions ] 00162 //[-------------------------------------------------------] 00163 public: 00164 /** 00165 * @brief 00166 * Constructor 00167 * 00168 * @param[in] sName 00169 * Device name 00170 * @param[in] pImpl 00171 * System specific device implementation, can, but shouldn't be a null pointer 00172 */ 00173 PLINPUT_API Keyboard(const PLCore::String &sName, DeviceImpl *pImpl); 00174 00175 /** 00176 * @brief 00177 * Destructor 00178 */ 00179 PLINPUT_API virtual ~Keyboard(); 00180 00181 00182 //[-------------------------------------------------------] 00183 //[ Public virtual Controller functions ] 00184 //[-------------------------------------------------------] 00185 public: 00186 PLINPUT_API virtual void Update() override; 00187 00188 00189 00190 }; 00191 00192 00193 //[-------------------------------------------------------] 00194 //[ Namespace ] 00195 //[-------------------------------------------------------] 00196 } // PLInput 00197 00198 00199 #endif // __PLINPUT_KEYBOARD_H__
|