summaryrefslogtreecommitdiffstats
path: root/ui/base/keycodes
Commit message (Collapse)AuthorAgeFilesLines
* Switch Pepper Linux to use shared USB<->native key conversion table.wez@chromium.org2013-02-232-8/+22
| | | | | | | | | | | | | | This fixes issues with the Linux table lagging behind the shared version, and: - Marks the UsbKeycodeToNativeKeycode helper "inline", for now, to avoid the warning on unused static functions, and since it is sufficiently simple to make sense to inline. - Tweaks the types of the array iterator in the other platform-specific implementations. BUG=177278,118432,165704 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=183841 Review URL: https://chromiumcodereview.appspot.com/12320014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184318 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 183841 - new static initializer on Linux.yoz@chromium.org2013-02-211-1/+1
| | | | | | | | | | | | | | | | | > Switch Pepper Linux to use shared USB<->native key conversion table. > > This fixes issues with the Linux table lagging behind the shared version, and: > - Marks the UsbKeycodeToNativeKeycode helper "inline", for now, to avoid the warning on unused static functions, and since it is sufficiently simple to make sense to inline. > - Tweaks the types of the array iterator in the other platform-specific implementations. > > BUG=177278,118432,165704 > > Review URL: https://chromiumcodereview.appspot.com/12320014 TBR=wez@chromium.org Review URL: https://codereview.chromium.org/12319046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183845 0039d316-1c4b-4281-b951-d872f2087c98
* Switch Pepper Linux to use shared USB<->native key conversion table.wez@chromium.org2013-02-211-1/+1
| | | | | | | | | | | | This fixes issues with the Linux table lagging behind the shared version, and: - Marks the UsbKeycodeToNativeKeycode helper "inline", for now, to avoid the warning on unused static functions, and since it is sufficiently simple to make sense to inline. - Tweaks the types of the array iterator in the other platform-specific implementations. BUG=177278,118432,165704 Review URL: https://chromiumcodereview.appspot.com/12320014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183841 0039d316-1c4b-4281-b951-d872f2087c98
* Fix international-backslash key in Canadian French keyboard.nona@chromium.org2013-02-131-0/+7
| | | | | | | | | | | | | | Adding guillemotleft, guillemotright and degree condition into KeyboardCodeFromXKeysym. These KeySym is used in Canadian French keyboard. BUG=175624 TEST=Checked with typing international-backslash key on Canadian French keyboard. Review URL: https://chromiumcodereview.appspot.com/12211127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182292 0039d316-1c4b-4281-b951-d872f2087c98
* Add a unit-test to sanity-check the USB<->native keycode mapping.wez@chromium.org2012-12-192-4/+107
| | | | | | | | | | | | | The mapping table is required to map 1:1; the special-case of the US backslash and non-US hash keys, which have different USB codes but the same native keycodes on all the platforms we support, is now implemented in the UsbKeycodeToNativeKeycode() helper function. BUG=165704 Review URL: https://chromiumcodereview.appspot.com/11599002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173974 0039d316-1c4b-4281-b951-d872f2087c98
* Add XKB keycode for non-US backslash to USB keycode tablewez@chromium.org2012-12-151-4/+3
| | | | | | | | | BUG=165704 Review URL: https://chromiumcodereview.appspot.com/11442058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173317 0039d316-1c4b-4281-b951-d872f2087c98
* Use per-file ownership for usb_keycode_map*.wez@chromium.org2012-12-141-3/+2
| | | | | | | | | | This currently covers usb_keycode_map.h, but also provides OWNERS for future additions such as unit-tests or USB<->mapping helpers. Review URL: https://chromiumcodereview.appspot.com/11555036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173083 0039d316-1c4b-4281-b951-d872f2087c98
* Support Help and Fn keys on Stout.yusukes@chromium.org2012-10-221-0/+18
| | | | | | | | | | | The scancodes for these keys are <FK14> and <FK15> respectively, that are translated to XF86XK_Launch5 and XF86XK_Launch6 XKeySyms. We have to convert the XKeySyms to valid VKEYs so that they are not filtered out as invalid keys. BUG=chrome-os-partner:14339 TEST=manually with an old Apple keyboard which has F13-19 keys Review URL: https://codereview.chromium.org/11238039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163397 0039d316-1c4b-4281-b951-d872f2087c98
* events: Move some files into ui/base/events/sadrul@chromium.org2012-09-041-1/+1
| | | | | | | | | BUG=none TBR=jam@chromium.org Review URL: https://chromiumcodereview.appspot.com/10917075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154817 0039d316-1c4b-4281-b951-d872f2087c98
* Add VKEY_POWER to the POSIX KeyboardCode enum.derat@chromium.org2012-08-232-0/+5
| | | | | | | | | | | | | | | I'm mapping XF86XK_PowerOff to VKEY_POWER on X. Otherwise, power button events on Chrome OS are mapped to VKEY_UNKNOWN and get thrown on the floor before we can interpret them as user activity. BUG=chromium:144295 TEST=power button undims the screen on chrome os Review URL: https://chromiumcodereview.appspot.com/10879023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152921 0039d316-1c4b-4281-b951-d872f2087c98
* Make KEY_WLAN toggle Wi-Fi enable/disable.mazda@chromium.org2012-08-162-2/+7
| | | | | | | | | | BUG=139039 TEST=Check KEY_WLAN (Fn+F11) toggles Wi-Fi on Parrot. Review URL: https://chromiumcodereview.appspot.com/10830346 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151933 0039d316-1c4b-4281-b951-d872f2087c98
* Make '=' and function keys on a keypad work.yusukes@chromium.org2012-07-311-2/+8
| | | | | | | | | | BUG=139407 TEST=None Review URL: https://chromiumcodereview.appspot.com/10832055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149112 0039d316-1c4b-4281-b951-d872f2087c98
* ui: No need to typedef testing::Test in unittests.tfarina@chromium.org2012-07-271-1/+2
| | | | | | | | | | | TEST() macro should be used instead. TEST=ui_unittests R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10808072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148710 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-115-5/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Do not ignore F3-F7 and F9 key presses on an Apple keyboard.yusukes@chromium.org2012-07-112-3/+26
| | | | | | | | | | BUG=123739 TEST=try Review URL: https://chromiumcodereview.appspot.com/10696161 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146131 0039d316-1c4b-4281-b951-d872f2087c98
* Move usb_keycode_map.h into ui/base/keycodes.garykac@chromium.org2012-06-132-0/+388
| | | | | | | | | | | | | | | | | | This file contains the mapping table to convert to/from USB scan codes and native Mac, Win and Linux key codes. Currently, 2 exact copies of this file exist: * webkit/plugins/ppapi * remoting/host This cl combines these files into one super-powerful USB key mapping table! BUG=118432 TEST=none Review URL: https://chromiumcodereview.appspot.com/10544106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141930 0039d316-1c4b-4281-b951-d872f2087c98
* Support Home, Search, Favorites, Refresh, Stop, Back, and Forward keys on an ↵yusukes@chromium.org2012-06-011-7/+44
| | | | | | | | | | | | | | external keyboard. Supporting these keys would be nice since Stumpy might be used with a keyboard with such keys. BUG=127209 TEST=manual Review URL: https://chromiumcodereview.appspot.com/10449064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139994 0039d316-1c4b-4281-b951-d872f2087c98
* Improve Num Lock support (http://crosbug.com/29169#c14).yusukes@chromium.org2012-04-191-0/+1
| | | | | | | | | | | | | | | | | | | | | chrome_browser_main_chromeos.cc: Disable Num Lock on Chrome startup. system_key_event_listener.cc: Immediately disable Num Lock when the user enables it. key_rewriter.*: Rewrites a NumPad key press/release without Num Lock to a corresponding keypress/release with the lock. keyboard_code_conversion_x.cc: Support XK_KP_Begin which is sent to Chrome when NumPad 5 is pressed without Num Lock. XK_KP_Begin is converted to VKEY_CLEAR following Windows' behavior. BUG=124189 TEST=ran unit_tests, manually tested with both a generic USB full keyboard and Stumpy's. Review URL: http://codereview.chromium.org/10035022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133027 0039d316-1c4b-4281-b951-d872f2087c98
* Remove TOOLKIT_USES_GTK and consolidate it into TOOLKIT_GTKoshima@chromium.org2012-04-051-1/+1
| | | | | | | | | | | Add gtk dependency to base.gyp for android host_os="linux" case BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9969080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130784 0039d316-1c4b-4281-b951-d872f2087c98
* ui/base: Clean up our AcceleratorGtk class.tfarina@chromium.org2012-04-022-4/+4
| | | | | | | | | | | | Currently this class is fully implemented in the header file, and this have annoyed me for a long time. Most of our class implementations reside in source files, so this patch fix this now. And this also makes it easier to read. R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9965049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130236 0039d316-1c4b-4281-b951-d872f2087c98
* Enabled pressing TAB to traverse through the Omnibox results, removed moving ↵aaron.randolph@gmail.com2012-02-292-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | the caret to the end of the line with TAB, and filtered out redundant URLs. This adds the ability to move through Omnibox result matches using TAB in addition to the arrow keys. To enable this, pressing TAB to move the caret to the end of the line was removed and the keyword hint/shortcut logic has been modified. The Omnibox popup now shows keyword markers on the right side of matches that have associated keywords (represented by a right arrow). When this kind of match is selected, and the keyword is accepted, the match changes appearance by animating in the associated keyword match from the right to display the "Search X for <>" message. If multiple matches have the same keyword then only the most relevant match will display the keyword marker and hint. Pressing TAB while a keyword hint is shown will enter keyword mode in place; the results will no longer change when keyword mode is entered. Additionally, substituting keyword provider matches will only be shown if a keyword substitution is available. Finally, results with redundant destination URLs (e.g., "foo.com", "www.foo.com") will have the less relevant URLs filtered out. This also addresses some GTK omnibox browsertest flakiness; see bug 112041. See original change review at http://codereview.chromium.org/6731036 Contributed by aaron.randolph@gmail.com BUG=57748,76278,77662,80934,84420 TEST=Press TAB to move the selection down the list of results, SHIFT+TAB to move up. Review URL: http://codereview.chromium.org/9309099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124125 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 122412 - Enabled pressing TAB to traverse through the Omnibox resultsthestig@chromium.org2012-02-172-2/+0
| | | | | | | | | | | | | | | Landing patch for aaron.randolph: http://codereview.chromium.org/9309099/ BUG=57748, 76278, 77662, 80934, 84420 TEST= Review URL: https://chromiumcodereview.appspot.com/9417032 TBR=sail@chromium.org Review URL: https://chromiumcodereview.appspot.com/9419043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122472 0039d316-1c4b-4281-b951-d872f2087c98
* Move IME shortcut keys from X to Aura [part 2 of 3].yusukes@chromium.org2012-02-171-0/+2
| | | | | | | | | | | | | - Handle Alt+Shift in ash/accelerators/ - Modify accelerator_manager.cc so it could handle ET_*_RELEASE accelerators. BUG=110408 TEST=ran aura_shell_unittests Review URL: http://codereview.chromium.org/9361053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122447 0039d316-1c4b-4281-b951-d872f2087c98
* Enabled pressing TAB to traverse through the Omnibox resultssail@chromium.org2012-02-172-0/+2
| | | | | | | | | | | | Landing patch for aaron.randolph: http://codereview.chromium.org/9309099/ BUG=57748, 76278, 77662, 80934, 84420 TEST= Review URL: https://chromiumcodereview.appspot.com/9417032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122412 0039d316-1c4b-4281-b951-d872f2087c98
* Handle F6 and F7 (brightness keys) in ash [part 3 of 3].yusukes@chromium.org2012-02-102-1/+14
| | | | | | | | | | | | Support multimedia keys on an external USB keyboard. Since Windows does not define VKs for brightness keys, add new VKEYs to keyboard_codes_posix.h. BUG=110407 TEST=ran aura_shell_unittests Review URL: http://codereview.chromium.org/9309098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121394 0039d316-1c4b-4281-b951-d872f2087c98
* Add VKEYs for Japanese JP106 keyboard and conversion rules for the new VKEYs.yusukes@chromium.org2012-02-083-2/+21
| | | | | | | | | | | | | | | | The VKEYs are necessary for moving IME hotkey handling code from X to Aura. On Windows, VK_CONVERT is sent to Chrome when Henkan (convertion) key is pressed, VK_NONCONVERT is sent on Muhenkan (no-conversion), and VK_DBE_SBCSCHAR and VK_DBE_DBCSCHAR are sent alternately on Zenkaku/Hankaku (full-width/half-widht toggle). On ChromeOS, keyboard_code_conversion_x.cc emulates the behavior as much as possible. http://msdn.microsoft.com/en-us/library/cc194848.aspx BUG=110408 TEST=try Review URL: http://codereview.chromium.org/9325088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120883 0039d316-1c4b-4281-b951-d872f2087c98
* Handle F8, F9, and F10 (volume keys) in ash [part 3 of 3].yusukes@google.com2012-02-061-0/+15
| | | | | | | | | | | Support multimedia keys on an external USB keyboard. BUG=110407 TEST=manually checked that volume buttons on a Microsoft Natural keyboard work. Review URL: https://chromiumcodereview.appspot.com/9318015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120619 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 120448 - Revert 120018 - Revert 120005 - Enabled pressing TAB to ↵pkasting@chromium.org2012-02-042-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | traverse through the Omnibox results, removed moving the caret to the end of the line with TAB, and filtered out redundant URLs. This adds the ability to move through Omnibox result matches using TAB in addition to the arrow keys. To enable this, pressing TAB to move the caret to the end of the line was removed and the keyword hint/shortcut logic has been modified. The Omnibox popup now shows keyword markers on the right side of matches that have associated keywords (represented by a right arrow). When this kind of match is selected, and the keyword is accepted, the match changes appearance by animating in the associated keyword match from the right to display the "Search X for <>" message. If multiple matches have the same keyword then only the most relevant match will display the keyword marker and hint. Pressing TAB while a keyword hint is shown will enter keyword mode in place; the results will no longer change when keyword mode is entered. Additionally, substituting keyword provider matches will only be shown if a keyword substitution is available. Finally, results with redundant destination URLs (e.g., "foo.com", "www.foo.com") will have the less relevant URLs filtered out. This also addresses some GTK omnibox browsertest flakiness; see bug 112041. Contributed by aaron.randolph@gmail.com BUG=57748,76278,77662,80934,84420 TEST=Press TAB to move the selection down the list of results, SHIFT+TAB to move up. Review URL: http://codereview.chromium.org/6731036 TBR=aaron.randolph@gmail.com Review URL: https://chromiumcodereview.appspot.com/9310017 TBR=kinuko@chromium.org Review URL: https://chromiumcodereview.appspot.com/9309097 TBR=pkasting@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120457 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 120018 - Revert 120005 - Enabled pressing TAB to traverse through the ↵pkasting@chromium.org2012-02-042-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Omnibox results, removed moving the caret to the end of the line with TAB, and filtered out redundant URLs. This adds the ability to move through Omnibox result matches using TAB in addition to the arrow keys. To enable this, pressing TAB to move the caret to the end of the line was removed and the keyword hint/shortcut logic has been modified. The Omnibox popup now shows keyword markers on the right side of matches that have associated keywords (represented by a right arrow). When this kind of match is selected, and the keyword is accepted, the match changes appearance by animating in the associated keyword match from the right to display the "Search X for <>" message. If multiple matches have the same keyword then only the most relevant match will display the keyword marker and hint. Pressing TAB while a keyword hint is shown will enter keyword mode in place; the results will no longer change when keyword mode is entered. Additionally, substituting keyword provider matches will only be shown if a keyword substitution is available. Finally, results with redundant destination URLs (e.g., "foo.com", "www.foo.com") will have the less relevant URLs filtered out. This also addresses some GTK omnibox browsertest flakiness; see bug 112041. Contributed by aaron.randolph@gmail.com BUG=57748,76278,77662,80934,84420 TEST=Press TAB to move the selection down the list of results, SHIFT+TAB to move up. Review URL: http://codereview.chromium.org/6731036 TBR=aaron.randolph@gmail.com Review URL: https://chromiumcodereview.appspot.com/9310017 TBR=kinuko@chromium.org Review URL: https://chromiumcodereview.appspot.com/9309097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120448 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 120005 - Enabled pressing TAB to traverse through the Omnibox ↵kinuko@chromium.org2012-02-012-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | results, removed moving the caret to the end of the line with TAB, and filtered out redundant URLs. This adds the ability to move through Omnibox result matches using TAB in addition to the arrow keys. To enable this, pressing TAB to move the caret to the end of the line was removed and the keyword hint/shortcut logic has been modified. The Omnibox popup now shows keyword markers on the right side of matches that have associated keywords (represented by a right arrow). When this kind of match is selected, and the keyword is accepted, the match changes appearance by animating in the associated keyword match from the right to display the "Search X for <>" message. If multiple matches have the same keyword then only the most relevant match will display the keyword marker and hint. Pressing TAB while a keyword hint is shown will enter keyword mode in place; the results will no longer change when keyword mode is entered. Additionally, substituting keyword provider matches will only be shown if a keyword substitution is available. Finally, results with redundant destination URLs (e.g., "foo.com", "www.foo.com") will have the less relevant URLs filtered out. This also addresses some GTK omnibox browsertest flakiness; see bug 112041. Contributed by aaron.randolph@gmail.com BUG=57748,76278,77662,80934,84420 TEST=Press TAB to move the selection down the list of results, SHIFT+TAB to move up. Review URL: http://codereview.chromium.org/6731036 TBR=aaron.randolph@gmail.com Review URL: https://chromiumcodereview.appspot.com/9310017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120018 0039d316-1c4b-4281-b951-d872f2087c98
* Enabled pressing TAB to traverse through the Omnibox results, removed moving ↵aaron.randolph@gmail.com2012-02-012-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | the caret to the end of the line with TAB, and filtered out redundant URLs. This adds the ability to move through Omnibox result matches using TAB in addition to the arrow keys. To enable this, pressing TAB to move the caret to the end of the line was removed and the keyword hint/shortcut logic has been modified. The Omnibox popup now shows keyword markers on the right side of matches that have associated keywords (represented by a right arrow). When this kind of match is selected, and the keyword is accepted, the match changes appearance by animating in the associated keyword match from the right to display the "Search X for <>" message. If multiple matches have the same keyword then only the most relevant match will display the keyword marker and hint. Pressing TAB while a keyword hint is shown will enter keyword mode in place; the results will no longer change when keyword mode is entered. Additionally, substituting keyword provider matches will only be shown if a keyword substitution is available. Finally, results with redundant destination URLs (e.g., "foo.com", "www.foo.com") will have the less relevant URLs filtered out. This also addresses some GTK omnibox browsertest flakiness; see bug 112041. Contributed by aaron.randolph@gmail.com BUG=57748,76278,77662,80934,84420 TEST=Press TAB to move the selection down the list of results, SHIFT+TAB to move up. Review URL: http://codereview.chromium.org/6731036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120005 0039d316-1c4b-4281-b951-d872f2087c98
* Do not map XK_Meta_L/R to VKEY_L/RWIN.yusukes@chromium.org2012-01-181-4/+2
| | | | | | | | | | | BUG=110361 BUG=110129 TEST=try Review URL: http://codereview.chromium.org/9241002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118103 0039d316-1c4b-4281-b951-d872f2087c98
* Remove false warnings on startup.yusukes@chromium.org2012-01-131-1/+23
| | | | | | | | | | BUG=109843 TEST=build Chrome for Linux, start Chrome, confirm no keysym warning is shown. Review URL: http://codereview.chromium.org/9185004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117614 0039d316-1c4b-4281-b951-d872f2087c98
* IME (input method editor) support for Aura, part 3 of 3: Use ui::InputMethod ↵yusukes@chromium.org2011-12-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in ash. Part 1: http://codereview.chromium.org/8659033/ Part 2: http://codereview.chromium.org/8687027/ The basic design of the feature is that to use an input method as an event filter for a KeyEvent, and to feed all KeyPress and KeyRelease events that are passed to the filter to the input method. The input method sends IME results (e.g. composition text) to RenderWidgetHostViewAura or NativeWidgetAura as needed. RenderWidgetHostViewAura: - Just like RWHVV, implements ui::TextInputClient interface so that RWHVA could receive an event such as 'SetComposition' and 'InsertChar' from an input method object owned by InputMethodEventFilter. - Sends a notification to the input method object on focus, blur, text input type change, etc. - OnKeyEvent() handler is now able to handle a non-native key event, e.g. a VKEY_PROCESSKEY event, which is fabricated by the input method editor. NativeWidgetAura: - Uses views::InputMethodBridge instead of views::InputMethodIBus. - InputMethodBridge, which implements ui::TextInputClient interface, just receives IME results (e.g. composition text) from ui::InputMethod and forwards them to Views UI (e.g. a text field). - InputMethodBridge also receives a request like 'CancelComposition' from the UI and forwards the request to ui::InputMethod. InputMethodEventFilter: - Creates and owns a ui::InputMethodIBus object. If IBus-1.4 is not available (e.g. Windows and Goobuntu), creates an instance of ui::MockInputMethod instead. - In PreHandleKeyEvent(), sends a KeyPress and KeyRelease event to the input method. - Implements ui::InputMethodDelegate interface so that InputMethodEventFilter could receive a translated key press and key release event (i.e. a key event translated by the IME) which has to be sent back to the root window. Note that the translated key event might be pre-handled by a global short-cut key event filter, otherwise is sent to NWA or RWHVA from the root window. Also note that a Char event is always sent directly from the input method to a TextInputClient. The ui::InputMethodDelegate is not used for that purpose. Supported platforms: - Aura + Chrome OS (IME works!) - Aura + Chrome OS + TOUCH_UI (compiles, but virtual keyboard is not shown since views::TextInputTypeTracker is not ported to Aura yet.) - Aura + Linux, with and without IBus-1.4 - Aura + Windows (compiles, but IME does not work. views::InputMethodWin is not ported to Aura yet.) BUG=97261 TEST=ran input_method_event_filter_unittests.cc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113224 Review URL: http://codereview.chromium.org/8576005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115778 0039d316-1c4b-4281-b951-d872f2087c98
* Aura needs event translation for Macdhollowa@chromium.org2011-12-202-2/+272
| | | | | | | | | | | | Implments translation code from NSEvent to aura::Event. BUG=107633 TEST=EventsMacTest.* R=ben@chromium.org, thakis@chromium.org Review URL: http://codereview.chromium.org/8953037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115084 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate two very similar functions; ui::WindowsKeyCodeForGdkKeyCode and ↵yusukes@chromium.org2011-12-122-373/+16
| | | | | | | | | | | | | | ui::KeyboardCodeFromXKeysym. Add some X keysym names that are handled by the former function to the latter. BUG=103511 TEST=ran try Review URL: http://codereview.chromium.org/8803004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113976 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ui::DefaultSymbolFromXEvent to ui::GetCharacterFromXEvent following ↵yusukes@chromium.org2011-12-082-3/+4
| | | | | | | | | | | | | | suzhe's suggestion. The new name would be more consistent since other functions that return a Unicode code point use ui::GetCharacterXXX. For example, keyboard_code_conversion.h has ui::GetCharacterFromKeyCode. BUG=None TEST=ran try Review URL: http://codereview.chromium.org/8802002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113586 0039d316-1c4b-4281-b951-d872f2087c98
* Convert keysym to keycode for modifiersoshima@chromium.org2011-12-071-2/+4
| | | | | | | | | | | | | Set mask after sending modifier keys. Print unknown keysym in hex and add warning for unknown keycode. BUG=106630 TEST=All BrowserKeyEventsTest except for AccessKey will pass Review URL: http://codereview.chromium.org/8836007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113456 0039d316-1c4b-4281-b951-d872f2087c98
* Enable RenderViewImplTest.{OnHandleKeyboardEvent,InsertCharacters} for Aura ↵mazda@chromium.org2011-12-071-0/+21
| | | | | | | | | | | | on X11. BUG=103499 TEST=Ran RenderViewImplTest.{OnHandleKeyboardEvent,InsertCharacter}. Review URL: http://codereview.chromium.org/8801008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113330 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 113224 - IME (input method editor) support for Aura, part 3 of 3: Use ↵ben@chromium.org2011-12-062-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui::InputMethod in ui/aura/. Part 1: http://codereview.chromium.org/8659033/ Part 2: http://codereview.chromium.org/8687027/ The basic design of the feature is that to add an input method object to DesktopHost to feed all KeyPress and KeyRelease events from the system message loop to the input method, and let the input method send IME results (e.g. composition text) to RenderWidgetHostViewAura or NativeWidgetAura as needed. RenderWidgetHostViewAura: - Just like RWHVV, implement ui::TextInputClient interface so that RWHVA could receive an event such as 'SetComposition' and 'InsertChar' from an input method object owned by DesktopHost. - Send a notification to the input method object on focus, blur, text input type change, etc. - OnKeyEvent() handler is now able to handle a non-native key event, e.g. a VKEY_PROCESSKEY event, which is fabricated by the input method editor. NativeWidgetAura: - Use views::InputMethodBridge instead of views::InputMethodIBus. - InputMethodBridge, which implements ui::TextInputClient interface, just receives IME results (e.g. composition text) from ui::InputMethod and forwards them to UI (e.g. a text field). - InputMethodBridge also receives a request like 'CancelComposition' from the UI and forwards the request to ui::InputMethod. DesktopHostLinux: - Creates and owns a ui::InputMethodIBusAura object. If IBus-1.4 is not available (e.g. Goobuntu), creates an instance of ui::MockInputMethod. - In Dispatch(), send a KeyPress and KeyRelease aura event to the input method. - Implement ui::InputMethodDelegate interface so that DesktopHostLinux could receive an key press and key release event which should be sent to NWA or RWHVA. Note that an "is_char" event is always sent directly from the input method to a TextInputClient. the ui::InputMethodDelegate is not used for that purpose. - ShouldSendCharEventForKeyboardCode() is moved to ui::InputMethod since DesktopHostLinux no longer generates a Char event. DesktopHostWin: - IME is not supported yet. Supported platforms: - Aura + Chrome OS (IME works!) - Aura + Chrome OS + TOUCH_UI (compiles, but virtual keyboard is not shown since views::TextInputTypeTracker is not ported to Aura yet.) - Aura + Linux, with and without IBus-1.4 - Aura + Windows (compiles, but IME does not work. views::InputMethodWin is not ported to Aura yet.) BUG=97261 TEST=ran aura_unittests Review URL: http://codereview.chromium.org/8576005 TBR=yusukes@chromium.org Review URL: http://codereview.chromium.org/8824007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113259 0039d316-1c4b-4281-b951-d872f2087c98
* IME (input method editor) support for Aura, part 3 of 3: Use ui::InputMethod ↵yusukes@chromium.org2011-12-062-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in ui/aura/. Part 1: http://codereview.chromium.org/8659033/ Part 2: http://codereview.chromium.org/8687027/ The basic design of the feature is that to add an input method object to DesktopHost to feed all KeyPress and KeyRelease events from the system message loop to the input method, and let the input method send IME results (e.g. composition text) to RenderWidgetHostViewAura or NativeWidgetAura as needed. RenderWidgetHostViewAura: - Just like RWHVV, implement ui::TextInputClient interface so that RWHVA could receive an event such as 'SetComposition' and 'InsertChar' from an input method object owned by DesktopHost. - Send a notification to the input method object on focus, blur, text input type change, etc. - OnKeyEvent() handler is now able to handle a non-native key event, e.g. a VKEY_PROCESSKEY event, which is fabricated by the input method editor. NativeWidgetAura: - Use views::InputMethodBridge instead of views::InputMethodIBus. - InputMethodBridge, which implements ui::TextInputClient interface, just receives IME results (e.g. composition text) from ui::InputMethod and forwards them to UI (e.g. a text field). - InputMethodBridge also receives a request like 'CancelComposition' from the UI and forwards the request to ui::InputMethod. DesktopHostLinux: - Creates and owns a ui::InputMethodIBusAura object. If IBus-1.4 is not available (e.g. Goobuntu), creates an instance of ui::MockInputMethod. - In Dispatch(), send a KeyPress and KeyRelease aura event to the input method. - Implement ui::InputMethodDelegate interface so that DesktopHostLinux could receive an key press and key release event which should be sent to NWA or RWHVA. Note that an "is_char" event is always sent directly from the input method to a TextInputClient. the ui::InputMethodDelegate is not used for that purpose. - ShouldSendCharEventForKeyboardCode() is moved to ui::InputMethod since DesktopHostLinux no longer generates a Char event. DesktopHostWin: - IME is not supported yet. Supported platforms: - Aura + Chrome OS (IME works!) - Aura + Chrome OS + TOUCH_UI (compiles, but virtual keyboard is not shown since views::TextInputTypeTracker is not ported to Aura yet.) - Aura + Linux, with and without IBus-1.4 - Aura + Windows (compiles, but IME does not work. views::InputMethodWin is not ported to Aura yet.) BUG=97261 TEST=ran aura_unittests Review URL: http://codereview.chromium.org/8576005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113224 0039d316-1c4b-4281-b951-d872f2087c98
* Valgrind: Fix the gcc 4.2 mac build.jhawkins@chromium.org2011-11-171-3/+5
| | | | | | | | | | | BUG=none TEST=none R=groby@chromium.org Review URL: http://codereview.chromium.org/8590010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110390 0039d316-1c4b-4281-b951-d872f2087c98
* Move GetCharacterFromKeyCode from views::KeyEvent to ↵yusukes@chromium.org2011-11-162-0/+147
| | | | | | | | | | | | ui/base/keycodes/keyboard_code_conversion.h. BUG=chromium:97261 TEST=try Review URL: http://codereview.chromium.org/8511061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110263 0039d316-1c4b-4281-b951-d872f2087c98
* Add Aura support to InputMethodIBus.yusukes@google.com2011-11-103-202/+226
| | | | | | | | | | | | | | | - Fix IBusKeyEventFromViewsKeyEvent() so the function could work fine when USE_AURA is defined. - Rename GdkKeyCodeForWindowsKeyCode() to XKeysymForWindowsKeyCode() since the function actually does not depend on Gtk/Gdk. XKeysymForWindowsKeyCode() is called in IBusKeyEventFromViewsKeyEvent() when USE_AURA is defined. - This CL is based on Peng's work at http://codereview.chromium.org/8423037. With this CL, we can use IME on Omnibox since NativeWidgetAura already has some preliminary IME support (http://codereview.chromium.org/8183011/) while RWHVA doesn't. BUG=chromium:97261 TEST=Build Chrome inside Chrome OS chroot with USE=aura, boot the OS, enable a CJK IME, and type something on Omnibox. Verify an IME preedit string appears. Review URL: http://codereview.chromium.org/8502010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109385 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Fix keyevents from the numpad.sadrul@chromium.org2011-10-271-12/+18
| | | | | | | | | | | | It turns out XLookupKeysym does not take into account the status of the lock/shift etc. keys. So we need to use XLookupString instead (which does). BUG=101831 TEST=manually Review URL: http://codereview.chromium.org/8416005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107621 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Fix shift/ctrl/alt keyevents with RWHVA and X11.sadrul@chromium.org2011-10-253-8/+18
| | | | | | | | | | | | | One of the functions didn't really do what it claimed it did. This ended up causing problems where pressing just the shift key (or the ctrl or alt key) would cause some garbage character to show up. BUG=101440 TEST=manually Review URL: http://codereview.chromium.org/8380033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107141 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Make key and mouse events for renderers work correctly in X11 with ↵sadrul@chromium.org2011-10-191-1/+1
| | | | | | | | | | | RWHVAura. BUG=none TEST=manually Review URL: http://codereview.chromium.org/8353005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106329 0039d316-1c4b-4281-b951-d872f2087c98
* Followup http://codereview.chromium.org/7740048: g_free() the keys mapnoel@chromium.org2011-08-301-3/+8
| | | | | | | | | | | | object (GdkKeymapKey*) returned by gdk_keymap_get_entries_for_keyval(). BUG=94211 TEST=webkit LayoutTests/plugins/keyboard-events.html Review URL: http://codereview.chromium.org/7777006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98771 0039d316-1c4b-4281-b951-d872f2087c98
* Add a GTK support routine that returns a simulated nativeKeyCode for a givennoel@chromium.org2011-08-292-0/+14
| | | | | | | | | | | | | | windowKeyCode. Simulated since there's no keyboard attached when testing in webkit DRT, so DRT::eventSender.keyDown() must simulate keyboard events. https://bugs.webkit.org/show_bug.cgi?id=66679 BUG=94211 TEST=webkit LayoutTests/plugins/keyboard-events.html Review URL: http://codereview.chromium.org/7740048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98599 0039d316-1c4b-4281-b951-d872f2087c98
* Rename UI_API to UI_EXPORT.darin@chromium.org2011-08-064-15/+15
| | | | | | | R=rvargas@chromium.org Review URL: http://codereview.chromium.org/7569005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95730 0039d316-1c4b-4281-b951-d872f2087c98