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

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

Issue 9241002: Do not map XK_Meta_L/R to VKEY_L/RWIN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 8 years, 11 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 return VKEY_SELECT; 282 return VKEY_SELECT;
283 case XK_Print: 283 case XK_Print:
284 return VKEY_PRINT; 284 return VKEY_PRINT;
285 case XK_Execute: 285 case XK_Execute:
286 return VKEY_EXECUTE; 286 return VKEY_EXECUTE;
287 case XK_Insert: 287 case XK_Insert:
288 case XK_KP_Insert: 288 case XK_KP_Insert:
289 return VKEY_INSERT; 289 return VKEY_INSERT;
290 case XK_Help: 290 case XK_Help:
291 return VKEY_HELP; 291 return VKEY_HELP;
292 case XK_Meta_L:
293 case XK_Super_L: 292 case XK_Super_L:
294 return VKEY_LWIN; 293 return VKEY_LWIN;
295 case XK_Meta_R:
296 case XK_Super_R: 294 case XK_Super_R:
297 return VKEY_RWIN; 295 return VKEY_RWIN;
298 case XK_Menu: 296 case XK_Menu:
299 return VKEY_APPS; 297 return VKEY_APPS;
300 case XK_F1: 298 case XK_F1:
301 case XK_F2: 299 case XK_F2:
302 case XK_F3: 300 case XK_F3:
303 case XK_F4: 301 case XK_F4:
304 case XK_F5: 302 case XK_F5:
305 case XK_F6: 303 case XK_F6:
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 case VKEY_T: 579 case VKEY_T:
582 case VKEY_U: 580 case VKEY_U:
583 case VKEY_V: 581 case VKEY_V:
584 case VKEY_W: 582 case VKEY_W:
585 case VKEY_X: 583 case VKEY_X:
586 case VKEY_Y: 584 case VKEY_Y:
587 case VKEY_Z: 585 case VKEY_Z:
588 return (shift ? XK_A : XK_a) + (keycode - VKEY_A); 586 return (shift ? XK_A : XK_a) + (keycode - VKEY_A);
589 587
590 case VKEY_LWIN: 588 case VKEY_LWIN:
591 return XK_Meta_L; 589 return XK_Super_L;
592 case VKEY_RWIN: 590 case VKEY_RWIN:
593 return XK_Meta_R; 591 return XK_Super_R;
594 592
595 case VKEY_NUMLOCK: 593 case VKEY_NUMLOCK:
596 return XK_Num_Lock; 594 return XK_Num_Lock;
597 595
598 case VKEY_SCROLL: 596 case VKEY_SCROLL:
599 return XK_Scroll_Lock; 597 return XK_Scroll_Lock;
600 598
601 case VKEY_OEM_1: 599 case VKEY_OEM_1:
602 return shift ? XK_colon : XK_semicolon; 600 return shift ? XK_colon : XK_semicolon;
603 case VKEY_OEM_PLUS: 601 case VKEY_OEM_PLUS:
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 case VKEY_F24: 645 case VKEY_F24:
648 return XK_F1 + (keycode - VKEY_F1); 646 return XK_F1 + (keycode - VKEY_F1);
649 647
650 default: 648 default:
651 LOG(WARNING) << "Unknown keycode:" << keycode; 649 LOG(WARNING) << "Unknown keycode:" << keycode;
652 return 0; 650 return 0;
653 } 651 }
654 } 652 }
655 653
656 } // namespace ui 654 } // 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