Closed Bug 713498 Opened 14 years ago Closed 14 years ago

Allow keyCode and charCode to be different in the temporary mozKeyboard interface

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: timdream, Assigned: timdream)

Details

(Whiteboard: [inbound])

Attachments

(1 file)

Attached patch patch v.0 — — Splinter Review
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.
Attachment #584307 - Flags: review?(fabrice)
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.
Attachment #584307 - Flags: review?(fabrice) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: