Last Comment Bug 713498 - Allow keyCode and charCode to be different in the temporary mozKeyboard interface
: Allow keyCode and charCode to be different in the temporary mozKeyboard inter...
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: General (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla12
Assigned To: Tim Guan-tin Chien [:timdream] (please needinfo; on leave in July)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-25 22:33 PST by Tim Guan-tin Chien [:timdream] (please needinfo; on leave in July)
Modified: 2011-12-26 18:00 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch v.0 (732 bytes, patch)
2011-12-25 22:33 PST, Tim Guan-tin Chien [:timdream] (please needinfo; on leave in July)
21: review+
Details | Diff | Review

Description Tim Guan-tin Chien [:timdream] (please needinfo; on leave in July) 2011-12-25 22:33:34 PST
Created attachment 584307 [details] [diff] [review]
patch v.0

Ref: https://github.com/andreasgal/gaia/issues/195

This bug prevents the touch keyboard to function properly - people are unable to test network functionality because they cannot type the "." symbol.

This patch fixes the mozKeyboard interface before the introduction of key events in bug 711486.
Comment 1 Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2011-12-26 06:01:28 PST
Comment on attachment 584307 [details] [diff] [review]
patch v.0

>diff -r 9f29daaecbcc b2g/chrome/content/shell.js
> MozKeyboard.prototype = {
>-  sendKey: function mozKeyboardSendKey(keyCode) {
>+  sendKey: function mozKeyboardSendKey(keyCode, charCode) {
>     var utils = window.QueryInterface(Ci.nsIInterfaceRequestor)
>                       .getInterface(Ci.nsIDOMWindowUtils);
>+    if (charCode === undefined) charCode = keyCode;
>     ['keydown', 'keypress', 'keyup'].forEach(function sendKeyEvents(type) {
>-      utils.sendKeyEvent(type, keyCode, keyCode, null);
>+      utils.sendKeyEvent(type, keyCode, charCode, null);

Just do utils.sendKeyEvent(type, keyCode, charCode || keyCode, null);

I will do it while merging.
Comment 2 Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2011-12-26 06:12:12 PST
http://hg.mozilla.org/integration/mozilla-inbound/rev/507252be27e8
Comment 3 Ed Morley [:emorley] 2011-12-26 18:00:12 PST
https://hg.mozilla.org/mozilla-central/rev/507252be27e8

Note You need to log in before you can comment on or make changes to this bug.