Closed Bug 1019427 Opened 6 years ago Closed 6 years ago

Log scancode -> virtual keycode table for KeyboardEvent.code debug on Windows

Categories

(Core :: Widget: Win32, enhancement)

x86_64
Windows 8.1
enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: masayuki, Assigned: masayuki)

Details

Attachments

(1 file)

This is just an enhancement.

If you don't like this patch since this adding logging code into release build, please -'ing the review. Then, I'll mark this bug as INVA.

Here is a table which is created from the log:
https://docs.google.com/spreadsheets/d/1fx-53xXI0cKL-18Dly8oFfIXc7RCOsB_VvI90nrwxA8/edit?usp=sharing

If this logging code is in release build, we can request this to users who have a special keyboard.
Attached patch PatchSplinter Review
Oops, I forgot to attach this patch at filing a bug. See comment 0 for the detail.
Attachment #8433124 - Flags: review?(jmathies)
Comment on attachment 8433124 [details] [diff] [review]
Patch

Review of attachment 8433124 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/windows/KeyboardLayout.cpp
@@ +2268,5 @@
> +          ::MapVirtualKeyEx(scanCode, kMapType, mKeyboardLayout);
> +        PR_LOG(sKeyboardLayoutLogger, PR_LOG_DEBUG,
> +               ("0x%04X, %s", scanCode, kVirtualKeyName[virtualKeyCode]));
> +      }
> +      if (!IsVistaOrLater()) {

this is kind of strange, the |for (uint32_t i = 0; i < ArrayLength(kExtendedScanCode); i++)| will do one iteration then exit on XP? Maybe add a comment here explaining this check.
Attachment #8433124 - Flags: review?(jmathies) → review+
https://hg.mozilla.org/mozilla-central/rev/54b35d7d75ce
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.