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

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: 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;
296 // Do not map XK_Meta_* to Windows keys. See crbug.com/110361.
Daniel Erat 2012/01/17 17:05:12 I think that this comment is probably unnecessary
Yusuke Sato 2012/01/18 05:19:54 Sure, removed.
298 case XK_Menu: 297 case XK_Menu:
299 return VKEY_APPS; 298 return VKEY_APPS;
300 case XK_F1: 299 case XK_F1:
301 case XK_F2: 300 case XK_F2:
302 case XK_F3: 301 case XK_F3:
303 case XK_F4: 302 case XK_F4:
304 case XK_F5: 303 case XK_F5:
305 case XK_F6: 304 case XK_F6:
306 case XK_F7: 305 case XK_F7:
307 case XK_F8: 306 case XK_F8:
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 case VKEY_T: 580 case VKEY_T:
582 case VKEY_U: 581 case VKEY_U:
583 case VKEY_V: 582 case VKEY_V:
584 case VKEY_W: 583 case VKEY_W:
585 case VKEY_X: 584 case VKEY_X:
586 case VKEY_Y: 585 case VKEY_Y:
587 case VKEY_Z: 586 case VKEY_Z:
588 return (shift ? XK_A : XK_a) + (keycode - VKEY_A); 587 return (shift ? XK_A : XK_a) + (keycode - VKEY_A);
589 588
590 case VKEY_LWIN: 589 case VKEY_LWIN:
591 return XK_Meta_L; 590 return XK_Meta_L;
sky 2012/01/17 16:58:55 What about this and the next case?
Yusuke Sato 2012/01/18 05:19:54 Thanks! Changed to XK_Super_L/R.
592 case VKEY_RWIN: 591 case VKEY_RWIN:
593 return XK_Meta_R; 592 return XK_Meta_R;
594 593
595 case VKEY_NUMLOCK: 594 case VKEY_NUMLOCK:
596 return XK_Num_Lock; 595 return XK_Num_Lock;
597 596
598 case VKEY_SCROLL: 597 case VKEY_SCROLL:
599 return XK_Scroll_Lock; 598 return XK_Scroll_Lock;
600 599
601 case VKEY_OEM_1: 600 case VKEY_OEM_1:
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 case VKEY_F24: 646 case VKEY_F24:
648 return XK_F1 + (keycode - VKEY_F1); 647 return XK_F1 + (keycode - VKEY_F1);
649 648
650 default: 649 default:
651 LOG(WARNING) << "Unknown keycode:" << keycode; 650 LOG(WARNING) << "Unknown keycode:" << keycode;
652 return 0; 651 return 0;
653 } 652 }
654 } 653 }
655 654
656 } // namespace ui 655 } // 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