summaryrefslogtreecommitdiffstats
path: root/ui/keyboard/keyboard_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/keyboard/keyboard_util.h')
-rw-r--r--ui/keyboard/keyboard_util.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/ui/keyboard/keyboard_util.h b/ui/keyboard/keyboard_util.h
index 7d46433..bb0edfb 100644
--- a/ui/keyboard/keyboard_util.h
+++ b/ui/keyboard/keyboard_util.h
@@ -29,7 +29,7 @@ enum CursorMoveDirection {
KEYBOARD_EXPORT bool IsKeyboardEnabled();
// Insert |text| into the active TextInputClient associated with |root_window|,
-// if there is one. Returns true if |text| was successfully inserted. Note
+// if there is one. Returns true if |text| was successfully inserted. Note
// that this may convert |text| into ui::KeyEvents for injection in some
// special circumstances (i.e. VKEY_RETURN, VKEY_BACK).
KEYBOARD_EXPORT bool InsertText(const base::string16& text,
@@ -41,7 +41,18 @@ KEYBOARD_EXPORT bool MoveCursor(int swipe_direction,
int modifier_flags,
aura::RootWindow* root_window);
-// Get the list of keyboard resources. |size| is populated with the number of
+// Sends a fabricated key event, where |type| is the event type, |key_value|
+// is the unicode value of the character, |key_code| is the legacy key code
+// value, and |shift_modifier| indicates if the shift key is being virtually
+// pressed. The event is dispatched to the active TextInputClient associated
+// with |root_window|. The type may be "keydown" or "keyup".
+KEYBOARD_EXPORT bool SendKeyEvent(std::string type,
+ int key_value,
+ int key_code,
+ bool shift_modifier,
+ aura::RootWindow* root_window);
+
+// Get the list of keyboard resources. |size| is populated with the number of
// resources in the returned array.
KEYBOARD_EXPORT const GritResourceMap* GetKeyboardExtensionResources(
size_t* size);