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

Side by Side Diff: ui/events/keycodes/keyboard_code_conversion_xkb.cc

Issue 1835493003: Convert XKB_KEY_XF86AudioPlay to MEDIA_PLAY_PAUSE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/events/keycodes/keyboard_code_conversion_xkb.h" 5 #include "ui/events/keycodes/keyboard_code_conversion_xkb.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "ui/events/keycodes/dom/dom_key.h" 8 #include "ui/events/keycodes/dom/dom_key.h"
9 #include "ui/events/keycodes/keyboard_code_conversion.h" 9 #include "ui/events/keycodes/keyboard_code_conversion.h"
10 10
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 case XKB_KEY_XF86Sleep: 232 case XKB_KEY_XF86Sleep:
233 case XKB_KEY_XF86Suspend: 233 case XKB_KEY_XF86Suspend:
234 return DomKey::STANDBY; 234 return DomKey::STANDBY;
235 case XKB_KEY_XF86AudioLowerVolume: 235 case XKB_KEY_XF86AudioLowerVolume:
236 return DomKey::AUDIO_VOLUME_DOWN; 236 return DomKey::AUDIO_VOLUME_DOWN;
237 case XKB_KEY_XF86AudioMute: 237 case XKB_KEY_XF86AudioMute:
238 return DomKey::AUDIO_VOLUME_MUTE; 238 return DomKey::AUDIO_VOLUME_MUTE;
239 case XKB_KEY_XF86AudioRaiseVolume: 239 case XKB_KEY_XF86AudioRaiseVolume:
240 return DomKey::AUDIO_VOLUME_UP; 240 return DomKey::AUDIO_VOLUME_UP;
241 case XKB_KEY_XF86AudioPlay: 241 case XKB_KEY_XF86AudioPlay:
242 return DomKey::MEDIA_PLAY; 242 return DomKey::MEDIA_PLAY_PAUSE;
243 case XKB_KEY_XF86AudioStop: 243 case XKB_KEY_XF86AudioStop:
244 return DomKey::MEDIA_STOP; 244 return DomKey::MEDIA_STOP;
245 case XKB_KEY_XF86AudioPrev: 245 case XKB_KEY_XF86AudioPrev:
246 return DomKey::MEDIA_TRACK_PREVIOUS; 246 return DomKey::MEDIA_TRACK_PREVIOUS;
247 case XKB_KEY_XF86AudioNext: 247 case XKB_KEY_XF86AudioNext:
248 return DomKey::MEDIA_TRACK_NEXT; 248 return DomKey::MEDIA_TRACK_NEXT;
249 case XKB_KEY_XF86HomePage: 249 case XKB_KEY_XF86HomePage:
250 return DomKey::BROWSER_HOME; 250 return DomKey::BROWSER_HOME;
251 case XKB_KEY_XF86Mail: 251 case XKB_KEY_XF86Mail:
252 return DomKey::LAUNCH_MAIL; 252 return DomKey::LAUNCH_MAIL;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 } 472 }
473 473
474 DomKey XKeySymToDomKey(xkb_keysym_t keysym, base::char16 character) { 474 DomKey XKeySymToDomKey(xkb_keysym_t keysym, base::char16 character) {
475 DomKey dom_key = NonPrintableXKeySymToDomKey(keysym); 475 DomKey dom_key = NonPrintableXKeySymToDomKey(keysym);
476 if (dom_key != DomKey::NONE) 476 if (dom_key != DomKey::NONE)
477 return dom_key; 477 return dom_key;
478 return DomKey::FromCharacter(character); 478 return DomKey::FromCharacter(character);
479 } 479 }
480 480
481 } // namespace ui 481 } // 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