Closed Bug 1272599 Opened 8 years ago Closed 8 years ago

[UI Events-key] Rename "MozHomeScreen", "MozCameraFocusAdjust" and "MozPhoneCall" key values to "GoHome", "CameraFocus" and "Call"


(Core :: DOM: Events, defect)

Gonk (Firefox OS)
Not set



Tracking Status
firefox49 --- fixed


(Reporter: masayuki, Assigned: masayuki)



(Keywords: dev-doc-complete, Whiteboard: btpp-active)


(2 files)

Latest UI Events KeyboardEvent key values define new key values which are currently defined with "Moz" prefix. We should rename them, but I don't know a good person of Gaia who I should notify of this change.

Smaug, do you know?
Flags: needinfo?(bugs)
Perhaps fabrice?

But if we don't want to be blocked on b2g cleanups, could we implement the new stuff with #ifndef MOZ_B2G and leave the old stuff with #ifdef MOZ_B2G ?
Flags: needinfo?(bugs) → needinfo?(fabrice)
Whiteboard: btpp-active
Olli, I checked gaia and we don't use MozPhoneCall anywhere. So I would go with #ifdef/#ifndef MOZ_B2G for MozHomeScreen and MozCameraFocusAdjust, and just rename MozPhoneCall.

That would be great if you could also file a bug in Gaia::General once this one is fixed to remind us to make the other changes. Thanks!
Flags: needinfo?(fabrice)
Android's KEYCODE_CALL was temporarily named as "MozPhoneCall" since proper key name was not defined in the spec. However, now, it's defined as "Call" in the latest spec. Therefore, we should rename this key name.

Note that this isn't available on Android because the key event is never fired on applications. However, this key may be useful on B2G. Although, the key is not used by current Gaia.

Review commit:
See other reviews:
Attachment #8755674 - Flags: review?(bugs)
Attachment #8755675 - Flags: review?(bugs)
KEYCODE_HOME was temporarily named as "MozHomeScreen" and KEYCODE_FOCUS was temprarily named as "MozCameraFocusAdjust" since they were not defined by the spec. However, in the latest spec, they are defined as "GoHome" and "CameraFocus". So, it is the time to rename them.

However, these temporary key names are still used by Gaia. Until it's fixed, we should keep using the temporary names only on B2G.

Review commit:
See other reviews:
Comment on attachment 8755674 [details]
MozReview Request: Bug 1272599 part.1 Rename KeyboardEvent.key value, "MozPhoneCall" to "Call" r?smaug

ok, so we can do the renaming because the name isn't used anywhere currently.
Attachment #8755674 - Flags: review?(bugs) → review+
Attachment #8755675 - Flags: review?(bugs) → review+
Comment on attachment 8755675 [details]
MozReview Request: Bug 1272599 part.2 Rename KeyboardEvent.key values, "MozHomeScreen" and "MozCameraFocusAdjust" to "GoHome" and "CameraFocus" except on B2G r?smaug

I see, we have already DEFINE_KEYNAME_WITH_SAME_NAME(GoHome) and such.
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Keywords: site-compat
Updated Firefox 49 for developers. I have a question in to :masayuki about some existing content in the key event docs that I need to clarify before I update the KeyboardEvent.key and KeyboardEvent.code pages as necessary; there are some things on this page that need to be cleaned up.
KeyboardEvent.key is updated. These keys are not currently on KeyboardEvent.code; if they need to be, the process of revising the page will get them added. See bug 1296444 for that refactor.
You need to log in before you can comment on or make changes to this bug.