All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriel Paubert <paubert@iram.es>
To: Frank Murphy <murphyf+linux-ppc@f-m.fm>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Linux kernel / USB keyboard scancode problems
Date: Tue, 26 Aug 2003 22:03:03 +0200	[thread overview]
Message-ID: <20030826200303.GA14385@iram.es> (raw)
In-Reply-To: <200308262124.04906.murphyf+linux-ppc@f-m.fm>


On Tue, Aug 26, 2003 at 09:24:02PM +0200, Frank Murphy wrote:
> On Tuesday 26 August 2003 11:35, Gabriel Paubert wrote:
> > On Sat, Aug 23, 2003 at 02:09:24PM +0200, Frank Murphy wrote:
> > >   To get the menu keysym, I'm supposed to press fn and Enter at the same
> > > time. But, instead of getting Menu (X keycode 117), I get 99.
> > > Unfortunately, that's the same keycode as Prior (PageUp), but I think
> > > that's an X bug. On the console with showkey -k, I get 101. With showkey
> > > -s, I get 0x5b 0xdb. Unfortunately, I don't know what these values are
> > > supposed to be for Menu
> >
> > Indeed that's an X bug, like the one (fixed now?) with the keypad equal.
>
> True, the fact that PageUp and Menu make the same keycode in X is an X bug.
> However, if the kernel sent the normal (i.e. i386) keycode, the X bug
> wouldn't be exposed.
>
> > X does its own mapping of raw keycodes to keycodes, and the mapping
> > is surjective (arghh). The option CustomKeyCodes in X allows you to bypass
> > this mapping (medium raw modes) but I believe it is deprecated.

On a PC, the Menu key sends e0 5d (and obviously e0 dd for key up). The linux
keycode is 127 but the X one is 117.


> > I believe it was benh in drivers/macintosh/adbhid.c on March 5th. Easy
> > to find with bk (1.10 revision in the tree on my Pismo which I have not
> > updated in a long time). Apparently the ADB keycodes have changed
> > depending on PB revisions.
>
> Thanks for the pointer! It looks like that's the right place. I've looked at
> it quickly, and it'll take me a while to figure out what's going on.

The following might be sufficient (just a wild guess, and it will
certainly break if you don't use linux keycodes):


===== adbhid.c 1.12 vs edited =====
--- 1.12/drivers/macintosh/adbhid.c	Sat Jul 12 03:15:34 2003
+++ edited/adbhid.c	Tue Aug 26 21:55:04 2003
@@ -70,7 +70,7 @@
 	 15, 57, 41, 14, 96,  1, 29,125, 42, 58, 56,105,106,108,103,  0,
 	  0, 83,  0, 55,  0, 78,  0, 69,  0,  0,  0, 98, 96,  0, 74,  0,
 	  0,117, 82, 79, 80, 81, 75, 76, 77, 71,  0, 72, 73,183,181,124,
-	 63, 64, 65, 61, 66, 67,191, 87,190, 99,  0, 70,  0, 68,101, 88,
+	 63, 64, 65, 61, 66, 67,191, 87,190, 99,  0, 70,  0, 68,127, 88,
 	  0,119,110,102,104,111, 62,107, 60,109, 59, 54,100, 97,126,116
 };


BTW, I'd also like to keep somewhere the state of the fn key in the
ADB keyboard driver. I've seen a MacOS utility which allows you to
use the trackpad as a scroll wheel while the fn button is pressed.
Thta's what I'd ike to copy.

	Regards,
	Gabriel


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2003-08-26 20:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-23 12:09 Linux kernel / USB keyboard scancode problems Frank Murphy
2003-08-26  9:35 ` Gabriel Paubert
2003-08-26 19:24   ` Frank Murphy
2003-08-26 20:03     ` Gabriel Paubert [this message]
2003-08-27  7:48       ` Frank Murphy
2003-08-27 18:29         ` Gabriel Paubert
2003-08-29 15:28           ` Frank Murphy
2003-08-30 15:20             ` Gabriel Paubert
2003-09-01 10:56               ` Frank Murphy
2003-09-01 11:46                 ` Gabriel Paubert
2003-09-01 12:59                   ` Frank Murphy
2003-09-02 12:12                     ` Gabriel Paubert
2003-09-02 15:59                       ` Frank Murphy
2003-09-08  9:03                         ` Frank Murphy

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=20030826200303.GA14385@iram.es \
    --to=paubert@iram.es \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=murphyf+linux-ppc@f-m.fm \
    /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.