Re: Handling of large keycodes
From: David Härdeman <david@hardeman.nu>
Date: 2010-08-06 21:06:51
Also in:
linux-media
On Sat, Jul 31, 2010 at 02:19:36AM -0700, Dmitry Torokhov wrote:
+/** + * struct keymap_entry - used by EVIOCGKEYCODE/EVIOCSKEYCODE ioctls + * @scancode: scancode represented in machine-endian form. + * @len: length of the scancode that resides in @scancode buffer. + * @index: index in the keymap, may be used instead of scancode + * @by_index: boolean value indicating that kernel should perform + * lookup in keymap by @index instead of @scancode + * @keycode: key code assigned to this scancode + * + * The structure is used to retrieve and modify keymap data. Users have
missing "the option" here?
+ * of performing lookup either by @scancode itself or by @index in
+ * keymap entry. EVIOCGKEYCODE will also return scancode or index
+ * (depending on which element was used to perform lookup).
+ */
+struct keymap_entry {
+ __u8 len;
+ __u8 by_index;
+ __u16 index;
+ __u32 keycode;
+ __u8 scancode[32];
};Perhaps it would be a good idea to add a flags member to the struct, either as an additional member or by replacing: __u8 by_index; with: __u32 flags; to help with any future extensions/changes/additions to the interface? -- David Härdeman -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html