Searched hist:"8 f7b057abe283a4505747ea8275751479442de53" (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/input/keyboard/ |
H A D | atkbd.c | diff 8f7b057abe283a4505747ea8275751479442de53 Tue Apr 28 02:51:15 CEST 2020 Rajat Jain <rajatja@google.com> Input: atkbd - expose function row physical map to userspace
Certain keyboards have their top-row keys intended for actions such as "Browser back", "Browser Refresh", "Fullscreen" etc as their primary mode, thus they will send scan codes for those actions. Further, they don't have a dedicated "Fn" key so don't have the capability to generate function key codes (e.g. F1, F2 etc..). However in this case, if userspace still wants to "synthesize" those function keys using the top row action keys, it needs to know the physical position of the top row keys. (Essentially a mapping between usage codes and a physical location in the top row).
This patch enhances the atkbd driver to receive such a mapping from the firmware / device tree, and expose it to userspace in the form of a function-row-physmap attribute. The attribute would be a space separated ordered list of physical codes, for the keys in the function row, in left-to-right order.
The attribute will only be present if the kernel knows about such mapping, otherwise the attribute shall not be visible.
Signed-off-by: Rajat Jain <rajatja@google.com> Link: https://lore.kernel.org/r/20200427210259.91330-2-rajatja@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|