All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Torkhov <atorkhov@gmail.com>
To: Jiri Kosina <jkosina@suse.cz>, linux-input@vger.kernel.org
Subject: Re: Problem with Genius Ergomedia 700
Date: Mon, 21 Jul 2008 17:51:32 +0400	[thread overview]
Message-ID: <48849464.8040705@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0802191359390.30955@jikos.suse.cz>

Hi.

Sorry, I forgot about this as I don't have access to that keyboard
anymore. What's the status of this patch? If it's still not applied
then, I think, it will work and could be merged.

Alex.

Jiri Kosina wrote:
> On Wed, 13 Feb 2008, Alexey Torkhov wrote:
> 
>>>   as a key to input.h right now, sorry; if you have any idea for
>>>   alternatives that it would make sense to map them, please let me know
>> It could be mapped to AL Logon/Logoff (19D) - if I remember, it doesn't
>> written what it should logon or logoff - user session or any other thing like
>> IM client.
> 
> Could you please try the patch below and report back whether it makes all 
> the buttons behave correctly? If so, I'd ask Dmitry for ACK with respect 
> to adding new KEY_ definitions.
> 
> diff --git a/drivers/hid/hid-input-quirks.c b/drivers/hid/hid-input-quirks.c
> index a870ba5..1db3a36 100644
> --- a/drivers/hid/hid-input-quirks.c
> +++ b/drivers/hid/hid-input-quirks.c
> @@ -276,6 +276,24 @@ static int quirk_btc_8193(struct hid_usage *usage, struct input_dev *input,
>  	return 1;
>  }
>  
> +static int quirk_genius_ergomedia_700(struct hid_usage *usage, struct input_dev *input,
> +			      unsigned long **bit, int *max)
> +{
> +	if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER)
> +		return 0;
> +
> +	switch (usage->hid & HID_USAGE) {
> +		case 0x029d: map_key_clear(KEY_PROG1);		break;
> +		case 0x029e: map_key_clear(KEY_PROG2);		break;
> +		case 0x029f: map_key_clear(KEY_PROG3);		break;
> +		case 0x02a1: map_key_clear(KEY_LOGON_LOGOFF);	break;
> +		case 0x02a2: map_key_clear(KEY_CAMERA);		break;
> +		case 0x02a3: map_key_clear(KEY_DOCUMENTS);	break;
> +		case 0x02a4: map_key_clear(KEY_AUDIO);		break;
> +		case 0x02a5: map_key_clear(KEY_PRESENTATION);	break;
> +
> +}
> +
>  #define VENDOR_ID_BELKIN			0x1020
>  #define DEVICE_ID_BELKIN_WIRELESS_KEYBOARD	0x0006
>  
> @@ -306,6 +324,9 @@ static int quirk_btc_8193(struct hid_usage *usage, struct input_dev *input,
>  #define VENDOR_ID_PETALYNX			0x18b1
>  #define DEVICE_ID_PETALYNX_MAXTER_REMOTE	0x0037
>  
> +#define VENDOR_ID_SUPERGATE			0x05d5
> +#define DEVICE_ID_GENIUS_ERGOMEDIA_700		0x8001
> +
>  static const struct hid_input_blacklist {
>  	__u16 idVendor;
>  	__u16 idProduct;
> @@ -332,7 +353,9 @@ static const struct hid_input_blacklist {
>  	{ VENDOR_ID_MONTEREY, DEVICE_ID_GENIUS_KB29E, quirk_cherry_genius_29e },
>  
>  	{ VENDOR_ID_PETALYNX, DEVICE_ID_PETALYNX_MAXTER_REMOTE, quirk_petalynx_remote },
> -	
> +
> +	{ VENDOR_ID_SUPERGATE, DEVICE_ID_GENIUS_ERGOMEDIA_700, quirk_genius_ergomedia_700 },
> +
>  	{ 0, 0, 0 }
>  };
>  
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index 5325d98..ef4e472 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -635,8 +635,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
>  				case 0x192: map_key_clear(KEY_CALC);		break;
>  				case 0x194: map_key_clear(KEY_FILE);		break;
>  				case 0x196: map_key_clear(KEY_WWW);		break;
> +				case 0x19b: map_key_clear(KEY_LOGON);		break;
>  				case 0x19c: map_key_clear(KEY_LOGOFF);		break;
> +				case 0x19d: map_key_clear(KEY_LOGON_LOGOFF);	break;
>  				case 0x19e: map_key_clear(KEY_COFFEE);		break;
> +				case 0x1a2: map_key_clear(KEY_TASKSELECT);	break;
>  				case 0x1a6: map_key_clear(KEY_HELP);		break;
>  				case 0x1a7: map_key_clear(KEY_DOCUMENTS);	break;
>  				case 0x1ab: map_key_clear(KEY_SPELLCHECK);	break;
> diff --git a/include/linux/input.h b/include/linux/input.h
> index 1bdc39a..cc322a5 100644
> --- a/include/linux/input.h
> +++ b/include/linux/input.h
> @@ -536,6 +536,9 @@ struct input_absinfo {
>  #define KEY_FRAMEFORWARD	0x1b5
>  
>  #define KEY_CONTEXT_MENU	0x1b6	/* GenDesc - system context menu */
> +#define KEY_TASKSELECT		0x1b7	/* Consumer - AL select task */
> +#define KEY_LOGON_LOGOFF	0x1b8	/* Consumer - AL Logon/Logoff */
> +#define KEY_LOGON		0x1b9	/* Consumer - AL Logon */
>  
>  #define KEY_DEL_EOL		0x1c0
>  #define KEY_DEL_EOS		0x1c1
> 




  parent reply	other threads:[~2008-07-21 14:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18  9:28 Problem with Genius Ergomedia 700 Alex Torkhov
2008-01-18 11:09 ` Jiri Kosina
2008-01-18 14:22   ` Alex Torkhov
     [not found]     ` <479203AA.7010607@gmail.com>
     [not found]       ` <Pine.LNX.4.64.0802112232360.7699@twin.jikos.cz>
     [not found]         ` <47B35742.7010305@gmail.com>
     [not found]           ` <Pine.LNX.4.64.0802191359390.30955@jikos.suse.cz>
2008-07-21 13:51             ` Alexey Torkhov [this message]
2008-07-22 13:30               ` Jiri Kosina

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=48849464.8040705@gmail.com \
    --to=atorkhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    /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.