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

Side by Side Diff: remoting/client/normalizing_input_filter_mac.cc

Issue 1908683002: Replace OS_LEFT/RIGHT with META_LEFT/RIGHT (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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "remoting/client/normalizing_input_filter_mac.h" 5 #include "remoting/client/normalizing_input_filter_mac.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 18 matching lines...) Expand all
29 bool is_special_key = 29 bool is_special_key =
30 dom_code == ui::DomCode::CONTROL_LEFT || 30 dom_code == ui::DomCode::CONTROL_LEFT ||
31 dom_code == ui::DomCode::SHIFT_LEFT || 31 dom_code == ui::DomCode::SHIFT_LEFT ||
32 dom_code == ui::DomCode::ALT_LEFT || 32 dom_code == ui::DomCode::ALT_LEFT ||
33 dom_code == ui::DomCode::CONTROL_RIGHT || 33 dom_code == ui::DomCode::CONTROL_RIGHT ||
34 dom_code == ui::DomCode::SHIFT_RIGHT || 34 dom_code == ui::DomCode::SHIFT_RIGHT ||
35 dom_code == ui::DomCode::ALT_RIGHT || 35 dom_code == ui::DomCode::ALT_RIGHT ||
36 dom_code == ui::DomCode::TAB; 36 dom_code == ui::DomCode::TAB;
37 37
38 bool is_cmd_key = 38 bool is_cmd_key =
39 dom_code == ui::DomCode::OS_LEFT || 39 dom_code == ui::DomCode::META_LEFT ||
40 dom_code == ui::DomCode::OS_RIGHT; 40 dom_code == ui::DomCode::META_RIGHT;
41 41
42 if (dom_code == ui::DomCode::CAPS_LOCK) { 42 if (dom_code == ui::DomCode::CAPS_LOCK) {
43 // Mac OS X generates keydown/keyup on lock-state transitions, rather than 43 // Mac OS X generates keydown/keyup on lock-state transitions, rather than
44 // when the key is pressed & released, so fake keydown/keyup on each event. 44 // when the key is pressed & released, so fake keydown/keyup on each event.
45 protocol::KeyEvent newEvent(event); 45 protocol::KeyEvent newEvent(event);
46 46
47 newEvent.set_pressed(true); 47 newEvent.set_pressed(true);
48 InputFilter::InjectKeyEvent(newEvent); 48 InputFilter::InjectKeyEvent(newEvent);
49 newEvent.set_pressed(false); 49 newEvent.set_pressed(false);
50 InputFilter::InjectKeyEvent(newEvent); 50 InputFilter::InjectKeyEvent(newEvent);
(...skipping 26 matching lines...) Expand all
77 protocol::KeyEvent event = i->second; 77 protocol::KeyEvent event = i->second;
78 event.set_pressed(false); 78 event.set_pressed(false);
79 InputFilter::InjectKeyEvent(event); 79 InputFilter::InjectKeyEvent(event);
80 } 80 }
81 81
82 // Clearing the map now that we have released all the pressed keys. 82 // Clearing the map now that we have released all the pressed keys.
83 key_pressed_map_.clear(); 83 key_pressed_map_.clear();
84 } 84 }
85 85
86 } // namespace remoting 86 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/normalizing_input_filter_cros_unittest.cc ('k') | remoting/client/normalizing_input_filter_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698