Add platform independent keyboard key codes

This commit is contained in:
Daniel Dressler committed 2013-06-23 22:06:41 -07:00
1 parent 3edf239571
commit 9963d00447
1 file changed
+151
+151
View File
@@ -0,0 +1,151 @@
// Copyright (c) 2013- PPSSPP Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0 or later versions.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#pragma once
typedef enum {
// Lower class latin
KEY_q = 1, // top row
KEY_w,
KEY_e,
KEY_r,
KEY_t,
KEY_y,
KEY_u,
KEY_i,
KEY_o,
KEY_p,
KEY_a, // mid row
KEY_s,
KEY_d,
KEY_f,
KEY_g,
KEY_h,
KEY_j,
KEY_k,
KEY_l,
KEY_z, // low row
KEY_x,
KEY_c,
KEY_v,
KEY_b,
KEY_n,
KEY_m,
// Upper class latin
KEY_Q, // top row
KEY_W,
KEY_E,
KEY_R,
KEY_T,
KEY_Y,
KEY_U,
KEY_I,
KEY_O,
KEY_P,
KEY_A, // mid row
KEY_S,
KEY_D,
KEY_F,
KEY_G,
KEY_H,
KEY_J,
KEY_K,
KEY_L,
KEY_Z, // low row
KEY_X,
KEY_C,
KEY_V,
KEY_B,
KEY_N,
KEY_M,
// Numeric
KEY_1,
KEY_2,
KEY_3,
KEY_4,
KEY_5,
KEY_6,
KEY_7,
KEY_8,
KEY_9,
KEY_0,
// Special keys
KEY_ARROW_LEFT,
KEY_ARROW_RIGHT,
KEY_ARROW_UP,
KEY_ARROW_DOWN,
KEY_ANALOG_LEFT,
KEY_ANALOG_RIGHT,
KEY_ANALOG_UP,
KEY_ANALOG_DOWN,
KEY_ANALOG_ALT_LEFT,
KEY_ANALOG_ALT_RIGHT,
KEY_ANALOG_ALT_UP,
KEY_ANALOG_ALT_DOWN,
KEY_SPACE,
KEY_ENTER,
KEY_CTRL_LEFT,
KEY_CTRL_RIGHT,
KEY_SHIFT_LEFT,
KEY_SHIFT_RIGHT,
KEY_ALT_LEFT,
KEY_ALT_RIGHT,
KEY_BACKSPACE,
KEY_SUPER,
KEY_TAB,
// Mobile Keys
KEY_VOLUME_UP,
KEY_VOLUME_DOWN,
KEY_HOME,
KEY_CALL_START,
KEY_CALL_END,
// Special PPSSPP keys
KEY_FASTFORWARD,
// Extra keys
// Use for platform specific keys.
// Example: android's back btn
KEY_EXTRA1,
KEY_EXTRA2,
KEY_EXTRA3,
KEY_EXTRA4,
KEY_EXTRA5,
KEY_EXTRA6,
KEY_EXTRA7,
KEY_EXTRA8,
KEY_EXTRA9,
KEY_EXTRA0,
// TODO: Add any missing keys.
// Many can be found in the
// window's port's keyboard
// files.
} kb_key_t;