linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luke Jones <luke@ljones.dev>
To: Jiri Kosina <jikos@kernel.org>
Cc: linux-input@vger.kernel.org, benjamin.tissoires@redhat.com,
	rydberg@bitmath.org, Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH V5] HID: asus: add support for ASUS N-Key keyboard
Date: Wed, 19 Aug 2020 07:58:14 +1200	[thread overview]
Message-ID: <2HZ9FQ.4JVT3NKM9S0E2@ljones.dev> (raw)
In-Reply-To: <nycvar.YFH.7.76.2008182034140.27422@cbobk.fhfr.pm>



On Tue, Aug 18, 2020 at 20:37, Jiri Kosina <jikos@kernel.org> wrote:
> On Tue, 18 Aug 2020, Luke Jones wrote:
>>  @@ -751,14 +841,14 @@ static int asus_input_mapping(struct 
>> hid_device *hdev,
>>   	     usage->hid == (HID_UP_GENDEVCTRLS | 0x0026)))
>>   		return -1;
>> 
>>  -	/* ASUS-specific keyboard hotkeys */
>>  -	if ((usage->hid & HID_USAGE_PAGE) == 0xff310000) {
>>  +	/* ASUS-specific keyboard hotkeys and led backlight */
>>  +	if ((usage->hid & HID_USAGE_PAGE) == HID_UP_ASUSVENDOR) {
>>   		switch (usage->hid & HID_USAGE) {
>>   		case 0x10: asus_map_key_clear(KEY_BRIGHTNESSDOWN);	break;
>>   		case 0x20: asus_map_key_clear(KEY_BRIGHTNESSUP);		break;
>>   		case 0x35: asus_map_key_clear(KEY_DISPLAY_OFF);		break;
>>   		case 0x6c: asus_map_key_clear(KEY_SLEEP);		break;
>>  -		case 0x7c: asus_map_key_clear(KEY_MICMUTE);		break;
>>  +		case 0x7c: asus_map_key_clear(KEY_F20);		break;
> 
> This change doesn't seem to be mentioned in the changelog; why is it 
> OK in
> general case for other devices sharing this codepath?
Do you mean the HID_UP_ASUSVENDOR? This evaluates to 0xff310000. I was 
unsure
how to address that - should I mention it in changes?

The MICMUTE issue: "change "Mic Toggle" to use a keycode that works" 
maybe I
should elaborate on this - the keycode appears to be unused or 
undetected by
KDE, Gnome, XFCE, and so the mic would never toggle. F20 gives the 
desired
effect.

Thank you for the feedback. I will submit a revised patch. Should this 
be in a
new thread as I've done so far, or as a reply here?

Kind regards,
Luke Jones.



  reply	other threads:[~2020-08-18 19:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18  7:59 [PATCH V5] HID: asus: add support for ASUS N-Key keyboard Luke Jones
2020-08-18 18:37 ` Jiri Kosina
2020-08-18 19:58   ` Luke Jones [this message]
2020-08-18 20:01     ` 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=2HZ9FQ.4JVT3NKM9S0E2@ljones.dev \
    --to=luke@ljones.dev \
    --cc=benjamin.tissoires@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=rydberg@bitmath.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).