Project

General

Profile

Actions

Bug #12049

closed

loader: ReadKeyStrokeEx may return partial keystrokes

Added by Toomas Soome over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

In some systems we can receive no scancode nor unicodechar values.

FreeBSD issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240760

Confirmed fix from two users.

Actions #1

Updated by John Levon over 3 years ago

I was curious about the spec here, it basically says:

The input stream supports Scan Codes in addition to Unicode characters. If the Scan Code is set to 0x00
then the Unicode character is valid and should be used. If the Scan Code is set to a non-0x00 value it
represents a special key as defined by Table 107.

For reasons that are entirely unclear, there are no (extended) scan codes for caps lock or shift, so an implementation seems to have two choices: either not return from GetKeyStroke at all, or return scancode=0x0,unichar=0x0. Since 0x0 is a "valid" unicode char, this seems like a reasonable thing to do.

Actions #2

Updated by Electric Monk over 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit bb4b7f47acc2c683b79216e79167725745ca353b

commit  bb4b7f47acc2c683b79216e79167725745ca353b
Author: Toomas Soome <tsoome@me.com>
Date:   2019-12-06T07:11:30.000Z

    12049 loader: ReadKeyStrokeEx may return partial keystrokes
    Reviewed by: Randy Fishel <randyf@sibernet.com>
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF