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

Side by Side Diff: ui/base/keycodes/keyboard_code_conversion_x.cc

Issue 10832055: Make '=' and function keys on a keypad work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/keycodes/keyboard_code_conversion_x.h" 5 #include "ui/base/keycodes/keyboard_code_conversion_x.h"
6 6
7 #define XK_3270 // for XK_3270_BackTab 7 #define XK_3270 // for XK_3270_BackTab
8 #include <X11/keysym.h> 8 #include <X11/keysym.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 #include <X11/Xutil.h> 10 #include <X11/Xutil.h>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 case XK_KP_Space: 57 case XK_KP_Space:
58 case XK_space: 58 case XK_space:
59 return VKEY_SPACE; 59 return VKEY_SPACE;
60 case XK_Home: 60 case XK_Home:
61 case XK_KP_Home: 61 case XK_KP_Home:
62 return VKEY_HOME; 62 return VKEY_HOME;
63 case XK_End: 63 case XK_End:
64 case XK_KP_End: 64 case XK_KP_End:
65 return VKEY_END; 65 return VKEY_END;
66 case XK_Page_Up: 66 case XK_Page_Up:
67 case XK_KP_Page_Up: 67 case XK_KP_Page_Up: // aka XK_KP_Prior
68 return VKEY_PRIOR; 68 return VKEY_PRIOR;
69 case XK_Page_Down: 69 case XK_Page_Down:
70 case XK_KP_Page_Down: 70 case XK_KP_Page_Down: // aka XK_KP_Next
71 return VKEY_NEXT; 71 return VKEY_NEXT;
72 case XK_Left: 72 case XK_Left:
73 case XK_KP_Left: 73 case XK_KP_Left:
74 return VKEY_LEFT; 74 return VKEY_LEFT;
75 case XK_Right: 75 case XK_Right:
76 case XK_KP_Right: 76 case XK_KP_Right:
77 return VKEY_RIGHT; 77 return VKEY_RIGHT;
78 case XK_Down: 78 case XK_Down:
79 case XK_KP_Down: 79 case XK_KP_Down:
80 return VKEY_DOWN; 80 return VKEY_DOWN;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 case XK_KP_Add: 228 case XK_KP_Add:
229 return VKEY_ADD; 229 return VKEY_ADD;
230 case XK_KP_Separator: 230 case XK_KP_Separator:
231 return VKEY_SEPARATOR; 231 return VKEY_SEPARATOR;
232 case XK_KP_Subtract: 232 case XK_KP_Subtract:
233 return VKEY_SUBTRACT; 233 return VKEY_SUBTRACT;
234 case XK_KP_Decimal: 234 case XK_KP_Decimal:
235 return VKEY_DECIMAL; 235 return VKEY_DECIMAL;
236 case XK_KP_Divide: 236 case XK_KP_Divide:
237 return VKEY_DIVIDE; 237 return VKEY_DIVIDE;
238 case XK_KP_Equal:
238 case XK_equal: 239 case XK_equal:
239 case XK_plus: 240 case XK_plus:
240 return VKEY_OEM_PLUS; 241 return VKEY_OEM_PLUS;
241 case XK_comma: 242 case XK_comma:
242 case XK_less: 243 case XK_less:
243 return VKEY_OEM_COMMA; 244 return VKEY_OEM_COMMA;
244 case XK_minus: 245 case XK_minus:
245 case XK_underscore: 246 case XK_underscore:
246 return VKEY_OEM_MINUS; 247 return VKEY_OEM_MINUS;
247 case XK_greater: 248 case XK_greater:
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 case XK_F16: 323 case XK_F16:
323 case XK_F17: 324 case XK_F17:
324 case XK_F18: 325 case XK_F18:
325 case XK_F19: 326 case XK_F19:
326 case XK_F20: 327 case XK_F20:
327 case XK_F21: 328 case XK_F21:
328 case XK_F22: 329 case XK_F22:
329 case XK_F23: 330 case XK_F23:
330 case XK_F24: 331 case XK_F24:
331 return static_cast<KeyboardCode>(VKEY_F1 + (keysym - XK_F1)); 332 return static_cast<KeyboardCode>(VKEY_F1 + (keysym - XK_F1));
333 case XK_KP_F1:
334 case XK_KP_F2:
335 case XK_KP_F3:
336 case XK_KP_F4:
337 return static_cast<KeyboardCode>(VKEY_F1 + (keysym - XK_KP_F1));
332 338
333 #if defined(TOOLKIT_GTK) 339 #if defined(TOOLKIT_GTK)
334 case XF86XK_Refresh: 340 case XF86XK_Refresh:
335 case XF86XK_History: 341 case XF86XK_History:
336 case XF86XK_OpenURL: 342 case XF86XK_OpenURL:
337 case XF86XK_AddFavorite: 343 case XF86XK_AddFavorite:
338 case XF86XK_Go: 344 case XF86XK_Go:
339 case XF86XK_ZoomIn: 345 case XF86XK_ZoomIn:
340 case XF86XK_ZoomOut: 346 case XF86XK_ZoomOut:
341 // ui::AcceleratorGtk tries to convert the XF86XK_ keysyms on Chrome 347 // ui::AcceleratorGtk tries to convert the XF86XK_ keysyms on Chrome
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 case VKEY_KBD_BRIGHTNESS_UP: 749 case VKEY_KBD_BRIGHTNESS_UP:
744 return XF86XK_KbdBrightnessUp; 750 return XF86XK_KbdBrightnessUp;
745 751
746 default: 752 default:
747 LOG(WARNING) << "Unknown keycode:" << keycode; 753 LOG(WARNING) << "Unknown keycode:" << keycode;
748 return 0; 754 return 0;
749 } 755 }
750 } 756 }
751 757
752 } // namespace ui 758 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698