RE: [PATCH v2 3/3] platform/x86: dell-wmi: add new dmi keys to bios_to_linux_keycode

Mario.Limonciello
2020-06-12T14:59:45Z

> >
> > >
> > > And what does mean "no function"? I do not know what should I imagine
> if
> > > I receive key press marked as "no function".
> >
> > It means no action is expected to occur, should behave like a no-op. I
> think
> > discarding it makes fine sense.
>
> Thank you! This was missing bit of information.
>
> Just I'm curious, why firmware sends "no-op" event which we could ignore?
> :D
>

I don't have details on this, but I can at least hypothesize a situation that
there was a manufacturing error with the wrong keyboard applied. Like think if
the system has keyboard without a backlight and there was a keyboard with
a silkscreened key for modifying backlight. In this case firmware events
related to keyboard backlight shouldn't flow through so firmware could instead
send this type of event.

> I can imagine that those events / scan codes may contain some
> information which we can use...

I mean I suppose you can choose to ignore my comments, but I'm telling you this
event doesn't contain anything useful.

>
> > >
> > > > > E.g. I remember that pressing Fn+Q or Fn+W on some Dell Latitude
> > > > > generates code 255, which could prove my thesis about "special
> codes"
> > > > > (which are probably not found in e.g. Windows or Linux mapping
> tables).
> > > > >
> > > > > > > };
> > > > > > >
> > > > > > > /*
> > > > > > > @@ -503,10 +504,7 @@ static void handle_dmi_entry(const struct
> > > > > dmi_header *dm, void *opaque)
> > > > > > > &table->keymap[i];
> > > > > > >
> > > > > > > /* Uninitialized entries are 0 aka KEY_RESERVED. */
> > > > > > > - u16 keycode = (bios_entry->keycode <
> > > > > > > - ARRAY_SIZE(bios_to_linux_keycode)) ?
> > > > > > > - bios_to_linux_keycode[bios_entry->keycode] :
> > > > > > > - KEY_RESERVED;
> > > > > > > + u16 keycode = bios_to_linux_keycode[bios_entry-
> >keycode];
> > > > > > >
> > > > > > > /*
> > > > > > > * Log if we find an entry in the DMI table that we
> don't
> > > > > > >
> > > > > >
> > > > > > Something like:
> > > > > >
> > > > > > u16 keycode;
> > > > > >
> > > > > > keycode = bios_entry->keycode == 0xffff ? KEY_UNKNOWN :
> > > > > > (bios_entry->keycode <
> > > > > > ARRAY_SIZE(bios_to_linux_keycode)) ?
> > > > > > bios_to_linux_keycode[bios_entry->keycode] :
> > > > > > KEY_RESERVED;
> > > > > >
> > > > > >
> > > > > >
> > > > > > Also please fix this:
> > > > > > (no To-header on input) <>
> > > > >
> > > > > Hint: specifying git send-email with '--to' argument instead of '--
> cc'
> > > > > should help.
> > > > >
> > > > > >
> > > > > > --
> > > > > > ~Randy
> > > > > >