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

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

Issue 12211127: Fix international-backslash key in Canadian French keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing comment Created 7 years, 10 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 case XK_F22: 329 case XK_F22:
330 case XK_F23: 330 case XK_F23:
331 case XK_F24: 331 case XK_F24:
332 return static_cast<KeyboardCode>(VKEY_F1 + (keysym - XK_F1)); 332 return static_cast<KeyboardCode>(VKEY_F1 + (keysym - XK_F1));
333 case XK_KP_F1: 333 case XK_KP_F1:
334 case XK_KP_F2: 334 case XK_KP_F2:
335 case XK_KP_F3: 335 case XK_KP_F3:
336 case XK_KP_F4: 336 case XK_KP_F4:
337 return static_cast<KeyboardCode>(VKEY_F1 + (keysym - XK_KP_F1)); 337 return static_cast<KeyboardCode>(VKEY_F1 + (keysym - XK_KP_F1));
338 338
339 case XK_guillemotleft:
340 case XK_guillemotright:
341 case XK_degree:
342 return VKEY_OEM_102; // international backslash key in 102 keyboard.
343
339 // When evdev is in use, /usr/share/X11/xkb/symbols/inet maps F13-18 keys 344 // When evdev is in use, /usr/share/X11/xkb/symbols/inet maps F13-18 keys
340 // to the special XF86XK symbols to support Microsoft Ergonomic keyboards: 345 // to the special XF86XK symbols to support Microsoft Ergonomic keyboards:
341 // https://bugs.freedesktop.org/show_bug.cgi?id=5783 346 // https://bugs.freedesktop.org/show_bug.cgi?id=5783
342 // In Chrome, we map these X key symbols back to F13-18 since we don't have 347 // In Chrome, we map these X key symbols back to F13-18 since we don't have
343 // VKEYs for these XF86XK symbols. 348 // VKEYs for these XF86XK symbols.
344 case XF86XK_Tools: 349 case XF86XK_Tools:
345 return VKEY_F13; 350 return VKEY_F13;
346 case XF86XK_Launch5: 351 case XF86XK_Launch5:
347 return VKEY_F14; 352 return VKEY_F14;
348 case XF86XK_Launch6: 353 case XF86XK_Launch6:
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 case VKEY_OEM_3: 699 case VKEY_OEM_3:
695 return shift ? XK_asciitilde : XK_quoteleft; 700 return shift ? XK_asciitilde : XK_quoteleft;
696 case VKEY_OEM_4: 701 case VKEY_OEM_4:
697 return shift ? XK_braceleft : XK_bracketleft; 702 return shift ? XK_braceleft : XK_bracketleft;
698 case VKEY_OEM_5: 703 case VKEY_OEM_5:
699 return shift ? XK_bar : XK_backslash; 704 return shift ? XK_bar : XK_backslash;
700 case VKEY_OEM_6: 705 case VKEY_OEM_6:
701 return shift ? XK_braceright : XK_bracketright; 706 return shift ? XK_braceright : XK_bracketright;
702 case VKEY_OEM_7: 707 case VKEY_OEM_7:
703 return shift ? XK_quotedbl : XK_quoteright; 708 return shift ? XK_quotedbl : XK_quoteright;
709 case VKEY_OEM_102:
710 return shift ? XK_guillemotleft : XK_guillemotright;
704 711
705 case VKEY_F1: 712 case VKEY_F1:
706 case VKEY_F2: 713 case VKEY_F2:
707 case VKEY_F3: 714 case VKEY_F3:
708 case VKEY_F4: 715 case VKEY_F4:
709 case VKEY_F5: 716 case VKEY_F5:
710 case VKEY_F6: 717 case VKEY_F6:
711 case VKEY_F7: 718 case VKEY_F7:
712 case VKEY_F8: 719 case VKEY_F8:
713 case VKEY_F9: 720 case VKEY_F9:
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 case VKEY_KBD_BRIGHTNESS_UP: 782 case VKEY_KBD_BRIGHTNESS_UP:
776 return XF86XK_KbdBrightnessUp; 783 return XF86XK_KbdBrightnessUp;
777 784
778 default: 785 default:
779 LOG(WARNING) << "Unknown keycode:" << keycode; 786 LOG(WARNING) << "Unknown keycode:" << keycode;
780 return 0; 787 return 0;
781 } 788 }
782 } 789 }
783 790
784 } // namespace ui 791 } // 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