All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Härdeman" <david@hardeman.nu>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
	Linux Input <linux-input@vger.kernel.org>,
	linux-media@vger.kernel.org, Jarod Wilson <jarod@redhat.com>,
	Maxim Levitsky <maximlevitsky@gmail.com>
Subject: Re: Handling of large keycodes
Date: Fri, 6 Aug 2010 22:56:29 +0200	[thread overview]
Message-ID: <20100806205629.GA24488@hardeman.nu> (raw)
In-Reply-To: <20100731091936.GA22253@core.coreip.homeip.net>

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

WARNING: multiple messages have this Message-ID (diff)
From: "David Härdeman" <david@hardeman.nu>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
	Linux Input <linux-input@vger.kernel.org>,
	linux-media@vger.kernel.org, Jarod Wilson <jarod@redhat.com>,
	Maxim Levitsky <maximlevitsky@gmail.com>
Subject: Re: Handling of large keycodes
Date: Fri, 6 Aug 2010 22:56:29 +0200	[thread overview]
Message-ID: <20100806205629.GA24488@hardeman.nu> (raw)
In-Reply-To: <20100731091936.GA22253@core.coreip.homeip.net>

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

  parent reply	other threads:[~2010-08-06 21:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-31  9:19 Handling of large keycodes Dmitry Torokhov
2010-07-31 11:03 ` Stefan Richter
2010-07-31 11:14   ` Stefan Richter
2010-08-02  8:06   ` Dmitry Torokhov
2010-07-31 13:23 ` Mauro Carvalho Chehab
2010-08-02  8:02   ` Dmitry Torokhov
2010-08-02 11:35     ` Mauro Carvalho Chehab
2010-08-02 15:19       ` Jarod Wilson
2010-08-06 21:00   ` David Härdeman
2010-08-06 21:00     ` David Härdeman
2010-08-06 20:56 ` David Härdeman [this message]
2010-08-06 20:56   ` David Härdeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100806205629.GA24488@hardeman.nu \
    --to=david@hardeman.nu \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jarod@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=maximlevitsky@gmail.com \
    --cc=mchehab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.