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

Unified Diff: views/events/event.h

Issue 8511061: Move GetCharacterFromKeyCode from views::KeyEvent to ui/base/keycodes/keyboard_code_conversion.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ui.gyp ('k') | views/events/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/events/event.h
diff --git a/views/events/event.h b/views/events/event.h
index a7b3620b08c92ae3fe470e467892fc988b23db67..d1b9b88d326f9fb1927fb8a9ca0951672ef1cd47 100644
--- a/views/events/event.h
+++ b/views/events/event.h
@@ -334,30 +334,6 @@ class VIEWS_EXPORT KeyEvent : public Event {
uint16 GetUnmodifiedCharacter() const;
private:
- // A helper function to get the character generated by a key event in a
- // platform independent way. It supports control characters as well.
- // It assumes a US keyboard layout is used, so it may only be used when there
- // is no native event or no better way to get the character.
- // For example, if a virtual keyboard implementation can only generate key
- // events with key_code and flags information, then there is no way for us to
- // determine the actual character that should be generate by the key. Because
- // a key_code only represents a physical key on the keyboard, it has nothing
- // to do with the actual character printed on that key. In such case, the only
- // thing we can do is to assume that we are using a US keyboard and get the
- // character according to US keyboard layout definition.
- // If a virtual keyboard implementation wants to support other keyboard
- // layouts, that may generate different text for a certain key than on a US
- // keyboard, a special native event object should be introduced to carry extra
- // information to help determine the correct character.
- // Take XKeyEvent as an example, it contains not only keycode and modifier
- // flags but also group and other extra XKB information to help determine the
- // correct character. That's why we can use XLookupString() function to get
- // the correct text generated by a X key event (See how is GetCharacter()
- // implemented in event_x.cc).
- // TODO(suzhe): define a native event object for virtual keyboard. We may need
- // to take the actual feature requirement into account.
- static uint16 GetCharacterFromKeyCode(ui::KeyboardCode key_code, int flags);
-
ui::KeyboardCode key_code_;
uint16 character_;
« no previous file with comments | « ui/ui.gyp ('k') | views/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698