I have problem typing text into textarea or text field using SendKeyEvent.
Platform: Ubuntu 14.04.2 LTS
CEF: 2272
Here is my code:
- Code: Select all
CefKeyEvent key;
key.windows_key_code = 65; //it is 'a' in ubuntu
key.modifiers = 0;
key.is_system_key = 0;
key.type = KEYEVENT_KEYDOWN;
browser->GetHost()->SendKeyEvent(key);
key.type = KEYEVENT_KEYUP;
browser->GetHost()->SendKeyEvent(key);
I have run the key test at http://www.keyboardtester.com/tester.html and confirm the key is pressed.
But those pressed key just don't appear in the text area. The text area remain empty.
The textarea has the focus too because the cursor is there.
How can I type something into text area or text field using SendKeyEvent ?
I wanna simulate real keyboard input by not setting the value directly in javascript.
Thanks.
Alson