[Webkit-unassigned] [Bug 16735] keyboard events created with DOM have keyCode and charCode of 0; thus they aren't handled correctly internally

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 6 01:52:33 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=16735


apandia.ttg at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |apandia.ttg at gmail.com




--- Comment #25 from apandia.ttg at gmail.com  2010-12-06 01:52:32 PST ---
I took this patch and it didn't work out directly for me (am using qt port).I made some additional changes and it works.

1.Inside "initKeyBoardEvent" created a new PlatformKeyBoardEvent(set it to m_keyEvent).
2. Use the "charCodeForKeyIdentifier" to get the char code of the keyIdentifier.Used this charCode to get the windowsKeyCode and set the value of m_windowsVirtualKeyCode with this key code.
3. In "EditorClientQt::handleKeyboardEvent" added 2 extra cases to handle home and end key as follows:-
        case VK_HOME:
            frame->editor()->command("MoveToBeginningOfLine").execute();
        case VK_END:
            frame->editor()->command("MoveToEndOfLine").execute();
4. For "A" key, used the key code to set the m_text. (for "!" can we use the char code??)

Let me know your feedback on the changes.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list