Open Bug 913058 Opened 12 years ago Updated 3 years ago

Map VolumeUp/VolumeDown event correctly

Categories

(Core :: DOM: Events, defect, P5)

ARM
Gonk (Firefox OS)
defect

Tracking

()

People

(Reporter: alive, Unassigned)

References

Details

In b2g for uncertain reason, when volumeUp/volumeDown are pressed, we are getting event.key == KeyboardEvent.VK_DOM_PAGE_UP/PAGE_DOWN. This is wrong. We need correct it before enabling sending key event to user app. BTW, mwu, could you point me out are we able to resolve this from gonk or not?
Flags: needinfo?(mwu)
Easily fixed on the widget side. PAGE_UP/PAGE_DOWN was a temporary solution until we had a better option. http://hg.mozilla.org/mozilla-central/file/aa9ec17cf912/widget/gonk/GonkKeyMapping.h#l51 is where the mappings are. If you need something more complicated, the actual mapping is done at http://hg.mozilla.org/mozilla-central/file/aa9ec17cf912/widget/gonk/nsAppShell.cpp#l239
Flags: needinfo?(mwu)
Does this mean we could move this to B2G component?
No. Core::Widget:Gonk if you want to move to a more specific component.
.key value should support most necessary keys. I believe that such strange .keyCode mapping should be removed as soon as possible. However, some .key names will be modified in next D3E draft. So, using .key is still unstable especially for applications on Firefox OS. When you need to use .key value, don't mind the compatibility. When I update the key names, I'll update the all key names in our tree too.
Note that when we support hardware keyboard connected via Bluetooth, we need to remove the strange keyCode mapping. Sharing keyCode between different keys makes .keyCode not useful on Firefox OS.
Blocks: 820706
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.