Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: base/keyboard_codes_linux.h

Issue 235025: Use windows keycodes under linux (and all non-windows platforms). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/keyboard_codes.h ('k') | base/keyboard_codes_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /*
6 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com. All rights reserved.
7 * Copyright (C) 2008, 2009 Google Inc.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 *
18 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
19 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR
25 * PROFITS, OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #ifndef BASE_KEYBOARD_CODES_LINUX_H_
32 #define BASE_KEYBOARD_CODES_LINUX_H_
33
34 #include <gdk/gdkkeysyms.h>
35 #include <X11/XF86keysym.h>
36
37 namespace base {
38
39 typedef enum {
40 VKEY_BACK = GDK_BackSpace,
41 VKEY_TAB = GDK_Tab,
42 VKEY_CLEAR = GDK_Clear,
43 VKEY_RETURN = GDK_Return,
44 VKEY_SHIFT = GDK_Shift_L, // TODO(jcampan): what about GDK_Shift_R?
45 VKEY_CONTROL = GDK_Control_L, // TODO(jcampan): what about GDK_Control_R?
46 VKEY_MENU = GDK_Menu,
47 VKEY_PAUSE = GDK_Pause,
48 VKEY_CAPITAL = GDK_Shift_Lock,
49 VKEY_KANA = GDK_Kana_Shift,
50 VKEY_HANGUL = GDK_Hangul,
51 // TODO(jcampan): not sure what the next 2 are.
52 VKEY_JUNJA = GDK_Hangul,
53 VKEY_FINAL = GDK_Hangul,
54 VKEY_HANJA = GDK_Hangul_Hanja,
55 VKEY_KANJI = GDK_Kanji,
56 VKEY_ESCAPE = GDK_Escape,
57 // TODO(jcampan): not sure what the next 4 are.
58 VKEY_CONVERT = 0x1C,
59 VKEY_NONCONVERT = 0x1D,
60 VKEY_ACCEPT = 0x1E,
61 VKEY_MODECHANGE = 0x1F,
62 VKEY_SPACE = GDK_space,
63 VKEY_PRIOR = GDK_Prior,
64 VKEY_NEXT = GDK_Next,
65 VKEY_END = GDK_End,
66 VKEY_HOME = GDK_Home,
67 VKEY_LEFT = GDK_Left,
68 VKEY_UP = GDK_Up,
69 VKEY_RIGHT = GDK_Right,
70 VKEY_DOWN = GDK_Down,
71 VKEY_SELECT = GDK_Select,
72 VKEY_PRINT = GDK_Print,
73 VKEY_EXECUTE = GDK_Execute,
74 VKEY_SNAPSHOT = 0x2C, // TODO(jcampan): not sure what this one is.
75 VKEY_INSERT = GDK_Insert,
76 VKEY_DELETE = GDK_Delete,
77 VKEY_HELP = GDK_Help,
78 VKEY_0 = GDK_0,
79 VKEY_1 = GDK_1,
80 VKEY_2 = GDK_2,
81 VKEY_3 = GDK_3,
82 VKEY_4 = GDK_4,
83 VKEY_5 = GDK_5,
84 VKEY_6 = GDK_6,
85 VKEY_7 = GDK_7,
86 VKEY_8 = GDK_8,
87 VKEY_9 = GDK_9,
88 VKEY_A = GDK_a,
89 VKEY_B = GDK_b,
90 VKEY_C = GDK_c,
91 VKEY_D = GDK_d,
92 VKEY_E = GDK_e,
93 VKEY_F = GDK_f,
94 VKEY_G = GDK_g,
95 VKEY_H = GDK_h,
96 VKEY_I = GDK_u,
97 VKEY_J = GDK_j,
98 VKEY_K = GDK_k,
99 VKEY_L = GDK_l,
100 VKEY_M = GDK_m,
101 VKEY_N = GDK_n,
102 VKEY_O = GDK_o,
103 VKEY_P = GDK_p,
104 VKEY_Q = GDK_q,
105 VKEY_R = GDK_r,
106 VKEY_S = GDK_s,
107 VKEY_T = GDK_t,
108 VKEY_U = GDK_u,
109 VKEY_V = GDK_v,
110 VKEY_W = GDK_w,
111 VKEY_X = GDK_x,
112 VKEY_Y = GDK_y,
113 VKEY_Z = GDK_z,
114 VKEY_LWIN = GDK_Meta_L,
115 VKEY_RWIN = GDK_Meta_R,
116 VKEY_APPS = 0x5D, // TODO(jcampan): not sure what this one is.
117 VKEY_SLEEP = XF86XK_Sleep,
118 VKEY_NUMPAD0 = GDK_KP_0,
119 VKEY_NUMPAD1 = GDK_KP_1,
120 VKEY_NUMPAD2 = GDK_KP_2,
121 VKEY_NUMPAD3 = GDK_KP_3,
122 VKEY_NUMPAD4 = GDK_KP_4,
123 VKEY_NUMPAD5 = GDK_KP_5,
124 VKEY_NUMPAD6 = GDK_KP_6,
125 VKEY_NUMPAD7 = GDK_KP_7,
126 VKEY_NUMPAD8 = GDK_KP_8,
127 VKEY_NUMPAD9 = GDK_KP_9,
128 VKEY_MULTIPLY = GDK_KP_Multiply,
129 VKEY_ADD = GDK_KP_Add,
130 VKEY_SEPARATOR = GDK_KP_Separator,
131 VKEY_SUBTRACT = GDK_KP_Subtract,
132 VKEY_DECIMAL = GDK_KP_Decimal,
133 VKEY_DIVIDE = GDK_KP_Divide,
134 VKEY_F1 = GDK_F1,
135 VKEY_F2 = GDK_F2,
136 VKEY_F3 = GDK_F3,
137 VKEY_F4 = GDK_F4,
138 VKEY_F5 = GDK_F5,
139 VKEY_F6 = GDK_F6,
140 VKEY_F7 = GDK_F7,
141 VKEY_F8 = GDK_F8,
142 VKEY_F9 = GDK_F9,
143 VKEY_F10 = GDK_F10,
144 VKEY_F11 = GDK_F11,
145 VKEY_F12 = GDK_F12,
146 VKEY_F13 = GDK_F13,
147 VKEY_F14 = GDK_F14,
148 VKEY_F15 = GDK_F15,
149 VKEY_F16 = GDK_F16,
150 VKEY_F17 = GDK_F17,
151 VKEY_F18 = GDK_F18,
152 VKEY_F19 = GDK_F19,
153 VKEY_F20 = GDK_F20,
154 VKEY_F21 = GDK_F21,
155 VKEY_F22 = GDK_F22,
156 VKEY_F23 = GDK_F23,
157 VKEY_F24 = GDK_F24,
158 VKEY_NUMLOCK = GDK_Num_Lock,
159 VKEY_SCROLL = GDK_Scroll_Lock,
160 VKEY_LSHIFT = GDK_Shift_L,
161 VKEY_RSHIFT = GDK_Shift_R,
162 VKEY_LCONTROL = GDK_Control_L,
163 VKEY_RCONTROL = GDK_Control_R,
164 VKEY_LMENU = GDK_Alt_L,
165 VKEY_RMENU = GDK_Alt_R,
166 VKEY_BROWSER_BACK = XF86XK_Back,
167 VKEY_BROWSER_FORWARD = XF86XK_Forward,
168 VKEY_BROWSER_REFRESH = XF86XK_Refresh,
169 VKEY_BROWSER_STOP = XF86XK_Stop,
170 VKEY_BROWSER_SEARCH = XF86XK_Search,
171 VKEY_BROWSER_FAVORITES = XF86XK_Favorites,
172 VKEY_BROWSER_HOME = XF86XK_HomePage,
173 VKEY_VOLUME_MUTE = XF86XK_AudioMute,
174 VKEY_VOLUME_DOWN = XF86XK_AudioLowerVolume,
175 VKEY_VOLUME_UP = XF86XK_AudioRaiseVolume,
176 VKEY_MEDIA_NEXT_TRACK = XF86XK_AudioNext,
177 VKEY_MEDIA_PREV_TRACK = XF86XK_AudioPrev,
178 VKEY_MEDIA_STOP = XF86XK_AudioStop,
179 VKEY_MEDIA_PLAY_PAUSE = XF86XK_AudioPause,
180 VKEY_MEDIA_LAUNCH_MAIL = XF86XK_Mail,
181 VKEY_MEDIA_LAUNCH_MEDIA_SELECT = XF86XK_AudioMedia,
182 VKEY_MEDIA_LAUNCH_APP1 = XF86XK_Launch1,
183 VKEY_MEDIA_LAUNCH_APP2 = XF86XK_Launch2,
184 // TODO(jcampan): Figure-out values below.
185 VKEY_OEM_1 = 0xBA,
186 VKEY_OEM_PLUS = 0xBB,
187 VKEY_OEM_COMMA = 0xBC,
188 VKEY_OEM_MINUS = 0xBD,
189 VKEY_OEM_PERIOD = 0xBE,
190 VKEY_OEM_2 = 0xBF,
191 VKEY_OEM_3 = 0xC0,
192 VKEY_OEM_4 = 0xDB,
193 VKEY_OEM_5 = 0xDC,
194 VKEY_OEM_6 = 0xDD,
195 VKEY_OEM_7 = 0xDE,
196 VKEY_OEM_8 = 0xDF,
197 VKEY_OEM_102 = 0xE2,
198 VKEY_PROCESSKEY = 0xE5,
199 VKEY_PACKET = 0xE7,
200 VKEY_ATTN = 0xF6,
201 VKEY_CRSEL = 0xF7,
202 VKEY_EXSEL = 0xF8,
203 VKEY_EREOF = 0xF9,
204 VKEY_PLAY = 0xFA,
205 VKEY_ZOOM = XF86XK_ZoomIn,
206 VKEY_NONAME = 0xFC,
207 VKEY_PA1 = 0xFD,
208 VKEY_OEM_CLEAR = 0xFE,
209 VKEY_UNKNOWN = 0
210 } KeyboardCode;
211
212 } // namespace views
213
214 #endif // BASE_KEYBOARD_CODES_LINUX_H_
OLDNEW
« no previous file with comments | « base/keyboard_codes.h ('k') | base/keyboard_codes_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698