From: "Joseph P. Garcia" <jpgarcia@execpc.com>
To: Bastien Nocera <hadess@hadess.net>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: userspace button controls
Date: Sun, 29 Jul 2001 01:09:05 -0500 [thread overview]
Message-ID: <20010729010905.3faf9642.jpgarcia@execpc.com> (raw)
In-Reply-To: <3B63877E.9060001@hadess.net>
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]
Greetings.
On Sun, 29 Jul 2001 04:48:14 +0100
Bastien Nocera <hadess@hadess.net> wrote:
> Well, the buttons_patch doesn't work on the ibook2:
[...]
> eject: Unhandled button code 0b
Perfect! This is what I was looking for. Attached is a patch to make things work... maybe. I don't know what to expect with the power key. The eject key on the iBook2 is apparantly still an adb-button... neato.. i think.
You will probably get an 'unknown scancode' for the eject key, but you can get the idea how to fix that from the patch. change the cooresponding 0 to a KEY_EJECTCD, recompile, and it should work. I don't know what exactly to expect from it.
BTW, I contacted James Simmons, a developer in linuxconsole and framebuffer. He mentioned that this sort of thing (fb-backlight, new input keys) are planned for 2.5.x. Which makes sense, as volume/eject keys are no big diff at the moment, but, as Michael Schmitz pointed out, the backlight-related changes should not be introduced under the table.
So volume keys and eject key (power too?) should be merge-able after completion and some testing.
Thanks for your help.
--
Joseph P. Garcia
http://www.lycestra.com/ (that's lie-kes-tra)
[-- Attachment #2: eject.patch --]
[-- Type: application/octet-stream, Size: 2258 bytes --]
diff -ruP -X ../ignorediff linux-2.4.7-pre7-benh20010722-volume/drivers/macintosh/adbhid.c linux-2.4.7-pre7-benh20010722-volume2/drivers/macintosh/adbhid.c
--- linux-2.4.7-pre7-benh20010722-volume/drivers/macintosh/adbhid.c Mon Jul 23 17:28:35 2001
+++ linux-2.4.7-pre7-benh20010722-volume2/drivers/macintosh/adbhid.c Sun Jul 29 00:32:25 2001
@@ -288,6 +288,9 @@
case 0x9: /* brightness increase */
input_report_key(&adbhid[id]->input, KEY_BRIGHTNESSUP, data[1] == (data[1] & 0xf));
break;
+ case 0xb: /* eject key */
+ input_report_key(&adbhid[id]->input, KEY_EJECTCD, data[1] == (data[1] & 0xf));
+ break;
default:
printk(KERN_INFO "Unhandled button code %02x\n",data[1]&0xf);
break;
diff -ruP -X ../ignorediff linux-2.4.7-pre7-benh20010722-volume/drivers/macintosh/mac_hid.c linux-2.4.7-pre7-benh20010722-volume2/drivers/macintosh/mac_hid.c
--- linux-2.4.7-pre7-benh20010722-volume/drivers/macintosh/mac_hid.c Thu Jun 28 09:29:50 2001
+++ linux-2.4.7-pre7-benh20010722-volume2/drivers/macintosh/mac_hid.c Sun Jul 29 00:38:43 2001
@@ -200,15 +200,15 @@
0, 0, 0, KEY_KPCOMMA, 0, KEY_INTL3, 0, 0, /* 0x00-0x07 */
0, 0, 0, 0, KEY_LANG1, KEY_LANG2, 0, 0, /* 0x08-0x0f */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x10-0x17 */
- 0, 0, 0, 0, KEY_KPENTER, KEY_RIGHTCTRL, 0, 0, /* 0x18-0x1f */
- 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20-0x27 */
+ 0, 0, 0, 0, KEY_KPENTER, KEY_RIGHTCTRL, KEY_VOLUMEUP, 0, /* 0x18-0x1f */
+ 0, 0, 0, 0, 0, KEY_VOLUMEDOWN, KEY_MUTE, 0, /* 0x20-0x27 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x28-0x2f */
0, 0, 0, 0, 0, KEY_KPSLASH, 0, KEY_SYSRQ, /* 0x30-0x37 */
- KEY_RIGHTALT, 0, 0, 0, 0, 0, 0, 0, /* 0x38-0x3f */
+ KEY_RIGHTALT, KEY_BRIGHTNESSUP, KEY_BRIGHTNESSDOWN, 0, 0, 0, 0, 0, /* 0x38-0x3f */
0, 0, 0, 0, 0, 0, 0, KEY_HOME, /* 0x40-0x47 */
KEY_UP, KEY_PAGEUP, 0, KEY_LEFT, 0, KEY_RIGHT, 0, KEY_END, /* 0x48-0x4f */
KEY_DOWN, KEY_PAGEDOWN, KEY_INSERT, KEY_DELETE, 0, 0, 0, 0, /* 0x50-0x57 */
- 0, 0, 0, KEY_LEFTMETA, KEY_RIGHTMETA, KEY_COMPOSE, 0, 0, /* 0x58-0x5f */
+ 0, 0, 0, KEY_LEFTMETA, KEY_RIGHTMETA, KEY_COMPOSE, KEY_POWER, 0, /* 0x58-0x5f */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x60-0x67 */
0, 0, 0, 0, 0, 0, 0, KEY_MACRO, /* 0x68-0x6f */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x70-0x77 */
next prev parent reply other threads:[~2001-07-29 6:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-24 6:55 userspace button controls Joseph P. Garcia
2001-07-24 9:40 ` Franz Sirl
2001-07-24 15:36 ` Michael Schmitz
2001-07-24 16:21 ` Joseph P. Garcia
2001-07-24 17:40 ` Michael Schmitz
2001-07-24 18:18 ` Joseph P. Garcia
2001-07-24 17:31 ` Bastien Nocera
2001-07-29 3:48 ` Bastien Nocera
2001-07-29 6:09 ` Joseph P. Garcia [this message]
2001-07-29 16:49 ` Bastien Nocera
2001-07-29 22:27 ` Bastien Nocera
2001-07-29 22:45 ` Clock problem Ethan Blanton
2001-07-29 22:51 ` Bastien Nocera
2001-07-30 16:16 ` Martin Costabel
2001-07-31 2:04 ` David Schleef
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=20010729010905.3faf9642.jpgarcia@execpc.com \
--to=jpgarcia@execpc.com \
--cc=hadess@hadess.net \
--cc=linuxppc-dev@lists.linuxppc.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.