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

Side by Side Diff: ui/events/ozone/evdev/key_event_converter_evdev.cc

Issue 404203003: Distinguish between keystroke and character events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsCharFromNative() for Mac build Created 6 years, 4 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 | « ui/events/events_stub.cc ('k') | ui/events/ozone/events_ozone.cc » ('j') | 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/ozone/evdev/key_event_converter_evdev.h" 5 #include "ui/events/ozone/evdev/key_event_converter_evdev.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <linux/input.h> 8 #include <linux/input.h>
9 9
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // Locking modifier keys: CapsLock. 256 // Locking modifier keys: CapsLock.
257 modifiers_->UpdateModifierLock(modifier, down); 257 modifiers_->UpdateModifierLock(modifier, down);
258 } else { 258 } else {
259 // Regular modifier keys: Shift, Ctrl, Alt, etc. 259 // Regular modifier keys: Shift, Ctrl, Alt, etc.
260 modifiers_->UpdateModifier(modifier, down); 260 modifiers_->UpdateModifier(modifier, down);
261 } 261 }
262 } 262 }
263 263
264 int flags = modifiers_->GetModifierFlags(); 264 int flags = modifiers_->GetModifierFlags();
265 265
266 KeyEvent key_event( 266 KeyEvent key_event(down ? ET_KEY_PRESSED : ET_KEY_RELEASED, code, flags);
267 down ? ET_KEY_PRESSED : ET_KEY_RELEASED, code, flags, false);
268 DispatchEventToCallback(&key_event); 267 DispatchEventToCallback(&key_event);
269 } 268 }
270 269
271 } // namespace ui 270 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/events_stub.cc ('k') | ui/events/ozone/events_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698