* Linux kernel / USB keyboard scancode problems @ 2003-08-23 12:09 Frank Murphy 2003-08-26 9:35 ` Gabriel Paubert 0 siblings, 1 reply; 14+ messages in thread From: Frank Murphy @ 2003-08-23 12:09 UTC (permalink / raw) To: linuxppc-dev Hi all, I recently upgraded my iBook (ppc) to the Debian stock 2.4.21 from the Debian stock 2.4.19 and I noticed a pleasant change: where I used to get a strange keycode in X for the "right" Apple-logo key (222), I now get 116, which is the same code I get when using an external USB keyboard with 2 Apple-logo keys. (On the iBook, the way to get the right key's code is to press this odd 'fn' key at the same time as the left logo key. Apple's description of how these keys should work can be found here: http://developer.apple.com/documentation/Hardware/Developer_Notes/Macintosh_CPUs-G3/original_iBook/iBook.25.html The problems I want to talk about regards similar keys: the Menu key, and F13, F14, & F15 (in the positions of Print Screen/SysRq, Scroll Lock, and Pause on an extended desktop keyboard). 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 On the extended keyboard F13, F14, & F15 (in the positions of Print Screen/SysRq, Scroll Lock, and Pause) also have strange keycodes. In X, they are keycodes 93, 123, and 127, respectively. With showkey -k, I get 85, 115, and 119. With showkey -s, I get 0x55 0xd5, 0x73 0xf3, and 0x77 0xf7. Unfortunately, I don't know what these values are when connected to an i386 Linux box because I don't have access to one right now (though I might be able to). Mapping these keys to either the equivalent (in position) or perhaps to "real" F13, F14, and F15 keys would make them actually usable. The right Apple-logo key was mysteriously fixed in 2.4.20 or 2.4.21. I'll help any way I can to get these four other keys fixed, too. Does anyone know who made the fix to the logo key? Thanks, Frank ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 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 0 siblings, 1 reply; 14+ messages in thread From: Gabriel Paubert @ 2003-08-26 9:35 UTC (permalink / raw) To: Frank Murphy; +Cc: linuxppc-dev On Sat, Aug 23, 2003 at 02:09:24PM +0200, Frank Murphy wrote: > > Hi all, > > I recently upgraded my iBook (ppc) to the Debian stock 2.4.21 from the > Debian stock 2.4.19 and I noticed a pleasant change: where I used to get a > strange keycode in X for the "right" Apple-logo key (222), I now get 116, > which is the same code I get when using an external USB keyboard with 2 > Apple-logo keys. (On the iBook, the way to get the right key's code is to > press this odd 'fn' key at the same time as the left logo key. Apple's > description of how these keys should work can be found here: > http://developer.apple.com/documentation/Hardware/Developer_Notes/Macintosh_CPUs-G3/original_iBook/iBook.25.html > > The problems I want to talk about regards similar keys: the Menu key, and > F13, F14, & F15 (in the positions of Print Screen/SysRq, Scroll Lock, and > Pause on an extended desktop keyboard). > > 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. 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. I had even found the source file in X in which this was handled but I have deleted the source tree since then and I refuse to touch a file of source code in which the only comment is a blurb of legalese at the beginning. > > On the extended keyboard F13, F14, & F15 (in the positions of Print > Screen/SysRq, Scroll Lock, and Pause) also have strange keycodes. In X, they > are keycodes 93, 123, and 127, respectively. With showkey -k, I get 85, 115, > and 119. With showkey -s, I get 0x55 0xd5, 0x73 0xf3, and 0x77 0xf7. > Unfortunately, I don't know what these values are when connected to an i386 > Linux box because I don't have access to one right now (though I might be > able to). Mapping these keys to either the equivalent (in position) or > perhaps to "real" F13, F14, and F15 keys would make them actually usable. > > The right Apple-logo key was mysteriously fixed in 2.4.20 or 2.4.21. I'll > help any way I can to get these four other keys fixed, too. Does anyone know > who made the fix to the logo key? 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. Regards, Gabriel > > Thanks, > > Frank > > ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 2003-08-26 9:35 ` Gabriel Paubert @ 2003-08-26 19:24 ` Frank Murphy 2003-08-26 20:03 ` Gabriel Paubert 0 siblings, 1 reply; 14+ messages in thread From: Frank Murphy @ 2003-08-26 19:24 UTC (permalink / raw) To: Gabriel Paubert; +Cc: linuxppc-dev 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. ... I've messed around with the CustomKeyCodes a bit, but mostly it makes the situation worse: some keys don't repeat properly and lots of non-core keys aren't mapped at all. > > On the extended keyboard F13, F14, & F15 (in the positions of Print > > Screen/SysRq, Scroll Lock, and Pause) also have strange keycodes. In X, > > they are keycodes 93, 123, and 127, respectively. With showkey -k, I get > > 85, 115, and 119. With showkey -s, I get 0x55 0xd5, 0x73 0xf3, and 0x77 > > 0xf7. Unfortunately, I don't know what these values are when connected to > > an i386 Linux box because I don't have access to one right now (though I > > might be able to). Mapping these keys to either the equivalent (in > > position) or perhaps to "real" F13, F14, and F15 keys would make them > > actually usable. > > > > The right Apple-logo key was mysteriously fixed in 2.4.20 or 2.4.21. > > I'll help any way I can to get these four other keys fixed, too. Does > > anyone know who made the fix to the logo key? > > 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. Thanks a lot, Frank ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 2003-08-26 19:24 ` Frank Murphy @ 2003-08-26 20:03 ` Gabriel Paubert 2003-08-27 7:48 ` Frank Murphy 0 siblings, 1 reply; 14+ messages in thread From: Gabriel Paubert @ 2003-08-26 20:03 UTC (permalink / raw) To: Frank Murphy; +Cc: linuxppc-dev 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/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 2003-08-26 20:03 ` Gabriel Paubert @ 2003-08-27 7:48 ` Frank Murphy 2003-08-27 18:29 ` Gabriel Paubert 0 siblings, 1 reply; 14+ messages in thread From: Frank Murphy @ 2003-08-27 7:48 UTC (permalink / raw) To: Gabriel Paubert; +Cc: linuxppc-dev On Tuesday 26 August 2003 10:03, Gabriel Paubert wrote: > On Tue, Aug 26, 2003 at 09:24:02PM +0200, Frank Murphy wrote: > > On Tuesday 26 August 2003 11:35, Gabriel Paubert wrote: > > > 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. Could you tell me what the keycodes are for Print Screen/SysRq, Scroll Lock, and Pause are on your keyboard? Just so I can track what F13, F14, & F15 could be. > The following might be sufficient (just a wild guess, and it will > certainly break if you don't use linux keycodes): Thanks for your guessed fix. I'll have to look at what you've done, but, wow, it's pretty cryptic. > 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. Huh. That would be pretty cool. Perhaps the real numlock state as well (if that's even possible). Frank ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 2003-08-27 7:48 ` Frank Murphy @ 2003-08-27 18:29 ` Gabriel Paubert 2003-08-29 15:28 ` Frank Murphy 0 siblings, 1 reply; 14+ messages in thread From: Gabriel Paubert @ 2003-08-27 18:29 UTC (permalink / raw) To: Frank Murphy; +Cc: linuxppc-dev On Wed, Aug 27, 2003 at 09:48:04AM +0200, Frank Murphy wrote: > On Tuesday 26 August 2003 10:03, Gabriel Paubert wrote: > > On Tue, Aug 26, 2003 at 09:24:02PM +0200, Frank Murphy wrote: > > > On Tuesday 26 August 2003 11:35, Gabriel Paubert wrote: > > > > 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. > > Could you tell me what the keycodes are for Print Screen/SysRq, Scroll Lock, > and Pause are on your keyboard? Just so I can track what F13, F14, & F15 > could be. Well, except for Scroll Lock, it's a mess. It depends on the other which are down at the time the key is pressed. Linux keycodes "Raw" scancodes (hex) X keycode Print Screen: 99 e0 2a e0 37 111 Alt+Print Screen: -- 54 92 Shift+Print Screen: 99 e0 37 111 Control+Print Screen: 99 e0 37 111 Scroll Lock: 70 46 78 Pause: 119 e0 1d 45 110 Control+Pause: 101 e0 46 114 > > > The following might be sufficient (just a wild guess, and it will > > certainly break if you don't use linux keycodes): > > Thanks for your guessed fix. I'll have to look at what you've done, but, wow, > it's pretty cryptic. Well, it is really simple. Replace 101 by 127 in the ADB to Linux keycode mappings. In this way the translation back to "raw" keycodes (only cooked twice!) gives 349, which is 256 + 93 (0xe0 0x5d). > > > 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. Hmm, seeing that last line, I should proofread sometimes before sending e-mail... > > Huh. That would be pretty cool. Perhaps the real numlock state as well (if > that's even possible). No, not the numlock. The keyboard utility under MacOS9 does not even know how to do this (it switches the display to the state of the numlock when it receives a keypad/non-keypad keycode). This is deep in the bowels of the PMU microcontroller and I would not try to reprogram it myself. OTOH, the fn keycodes are simply ignored (ADB code 0x3f IIRC) in the kernel, but the PMU sends the key down and up events. Gabriel ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 2003-08-27 18:29 ` Gabriel Paubert @ 2003-08-29 15:28 ` Frank Murphy 2003-08-30 15:20 ` Gabriel Paubert 0 siblings, 1 reply; 14+ messages in thread From: Frank Murphy @ 2003-08-29 15:28 UTC (permalink / raw) To: Gabriel Paubert; +Cc: linuxppc-dev On Wednesday 27 August 2003 8:29, Gabriel Paubert wrote: > Well, except for Scroll Lock, it's a mess. It depends on the other which > are down at the time the key is pressed. Thanks for these. Because they're such a mess, perhaps the codes for F13, F14, and F15 should be used instead. Now just to find out what they are, and if all Apple keyboards have these keys as F13, 14, & 15. > > > The following might be sufficient (just a wild guess, and it will > > > certainly break if you don't use linux keycodes): > > > > Thanks for your guessed fix. I'll have to look at what you've done, but, > > wow, it's pretty cryptic. > > Well, it is really simple. Replace 101 by 127 in the ADB to Linux keycode > mappings. In this way the translation back to "raw" keycodes (only cooked > twice!) gives 349, which is 256 + 93 (0xe0 0x5d). Well, I guess the trick is to know which one to change. :) Frank ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 2003-08-29 15:28 ` Frank Murphy @ 2003-08-30 15:20 ` Gabriel Paubert 2003-09-01 10:56 ` Frank Murphy 0 siblings, 1 reply; 14+ messages in thread From: Gabriel Paubert @ 2003-08-30 15:20 UTC (permalink / raw) To: Frank Murphy; +Cc: linuxppc-dev On Fri, Aug 29, 2003 at 05:28:01PM +0200, Frank Murphy wrote: > > On Wednesday 27 August 2003 8:29, Gabriel Paubert wrote: > > Well, except for Scroll Lock, it's a mess. It depends on the other which > > are down at the time the key is pressed. > > Thanks for these. Because they're such a mess, perhaps the codes for F13, F14, > and F15 should be used instead. Now just to find out what they are, and if > all Apple keyboards have these keys as F13, 14, & 15. >From include/linux/input.h (latest Linus'bk repository, lines 195-200): #define KEY_F13 85 #define KEY_102ND 86 #define KEY_F11 87 #define KEY_F12 88 #define KEY_F14 89 #define KEY_F15 90 which are mapped to 85/115/119 for emulated raw scancodes in drivers/char/keyboard.c, or rather 0x55/0x73/0x77 since scancodes ar normally typed in hex. Of course the problem is that X wants these in 118/119/120. I've just checked out the X CVS tree and my head hurts. I believe that the relevant code is in: programs/Xserver/hw/xfree86/common/xf86Events.c. But it's so hard to follow :-( Anyway, if I follow the X code correctly (a big if), 0x55 and 0x77 won't be remapped, but 0x73 will be, to 0xCB. After that we add 8 to compute the X keycode which become: 93, 211, and 127. With some luck, there may be a solution since none of these key codes are used under X, neither on the Mac nor on the PC. > > > > > The following might be sufficient (just a wild guess, and it will > > > > certainly break if you don't use linux keycodes): > > > > > > Thanks for your guessed fix. I'll have to look at what you've done, but, > > > wow, it's pretty cryptic. > > > > Well, it is really simple. Replace 101 by 127 in the ADB to Linux keycode > > mappings. In this way the translation back to "raw" keycodes (only cooked > > twice!) gives 349, which is 256 + 93 (0xe0 0x5d). > > Well, I guess the trick is to know which one to change. :) Did you actually try the patch. If yes, on which kernel? Regards, Gabriel ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 2003-08-30 15:20 ` Gabriel Paubert @ 2003-09-01 10:56 ` Frank Murphy 2003-09-01 11:46 ` Gabriel Paubert 0 siblings, 1 reply; 14+ messages in thread From: Frank Murphy @ 2003-09-01 10:56 UTC (permalink / raw) To: Gabriel Paubert; +Cc: linuxppc-dev On Saturday 30 August 2003 5:20, Gabriel Paubert wrote: > On Fri, Aug 29, 2003 at 05:28:01PM +0200, Frank Murphy wrote: > > Thanks for these. Because they're such a mess, perhaps the codes for F13, > > F14, and F15 should be used instead. Now just to find out what they are, > > and if all Apple keyboards have these keys as F13, 14, & 15. > > From include/linux/input.h (latest Linus'bk repository, lines 195-200): > > #define KEY_F13 85 > #define KEY_102ND 86 > #define KEY_F11 87 > #define KEY_F12 88 > #define KEY_F14 89 > #define KEY_F15 90 > > which are mapped to 85/115/119 for emulated raw scancodes > in drivers/char/keyboard.c, or rather 0x55/0x73/0x77 since > scancodes ar normally typed in hex. > > Of course the problem is that X wants these in 118/119/120. I've just > checked out the X CVS tree and my head hurts. I believe that the relevant > code is in: programs/Xserver/hw/xfree86/common/xf86Events.c. > > But it's so hard to follow :-( > > Anyway, if I follow the X code correctly (a big if), 0x55 and 0x77 > won't be remapped, but 0x73 will be, to 0xCB. After that we add 8 > to compute the X keycode which become: 93, 211, and 127. > > With some luck, there may be a solution since none of these key > codes are used under X, neither on the Mac nor on the PC. Yeah, the keycode/scancode/keysym stuff is a twisty maze. I do have the hardware to test these changes, if you have a guess to what they should be. > > > > > The following might be sufficient (just a wild guess, and it will > > > > > certainly break if you don't use linux keycodes): > > > > > > > > Thanks for your guessed fix. I'll have to look at what you've done, > > > > but, wow, it's pretty cryptic. > > > > > > Well, it is really simple. Replace 101 by 127 in the ADB to Linux > > > keycode mappings. In this way the translation back to "raw" keycodes > > > (only cooked twice!) gives 349, which is 256 + 93 (0xe0 0x5d). > > > > Well, I guess the trick is to know which one to change. :) > > Did you actually try the patch. If yes, on which kernel? I have, and it seems to work fine for me. I patched the debian source from kernel-source-2.4.21. Other keys seem to work fine, but I havent checked every single key, but I'm using it succesfully now. Frank ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 2003-09-01 10:56 ` Frank Murphy @ 2003-09-01 11:46 ` Gabriel Paubert 2003-09-01 12:59 ` Frank Murphy 0 siblings, 1 reply; 14+ messages in thread From: Gabriel Paubert @ 2003-09-01 11:46 UTC (permalink / raw) To: Frank Murphy; +Cc: linuxppc-dev On Mon, Sep 01, 2003 at 12:56:38PM +0200, Frank Murphy wrote: > On Saturday 30 August 2003 5:20, Gabriel Paubert wrote: > > On Fri, Aug 29, 2003 at 05:28:01PM +0200, Frank Murphy wrote: > > > Thanks for these. Because they're such a mess, perhaps the codes for F13, > > > F14, and F15 should be used instead. Now just to find out what they are, > > > and if all Apple keyboards have these keys as F13, 14, & 15. > > > > From include/linux/input.h (latest Linus'bk repository, lines 195-200): > > > > #define KEY_F13 85 > > #define KEY_102ND 86 > > #define KEY_F11 87 > > #define KEY_F12 88 > > #define KEY_F14 89 > > #define KEY_F15 90 > > > > which are mapped to 85/115/119 for emulated raw scancodes > > in drivers/char/keyboard.c, or rather 0x55/0x73/0x77 since > > scancodes ar normally typed in hex. > > > > Of course the problem is that X wants these in 118/119/120. I've just > > checked out the X CVS tree and my head hurts. I believe that the relevant > > code is in: programs/Xserver/hw/xfree86/common/xf86Events.c. > > > > But it's so hard to follow :-( > > > > Anyway, if I follow the X code correctly (a big if), 0x55 and 0x77 > > won't be remapped, but 0x73 will be, to 0xCB. After that we add 8 > > to compute the X keycode which become: 93, 211, and 127. > > > > With some luck, there may be a solution since none of these key > > codes are used under X, neither on the Mac nor on the PC. > > Yeah, the keycode/scancode/keysym stuff is a twisty maze. I do have the > hardware to test these changes, if you have a guess to what they should be. What keyboard(s) do you have ? I've only access to my Pismo now, and it obviously does not have the F13-F15 keys. I shall be back in front on my G4 in a few days. I'd first need to know what "showkey -k" and "showkey -s" give for these 3 keys on your keybord. > > Did you actually try the patch. If yes, on which kernel? > > I have, and it seems to work fine for me. I patched the debian source from > kernel-source-2.4.21. Other keys seem to work fine, but I havent checked > every single key, but I'm using it succesfully now. Good, given the very limited impact of the patch it's probably correct :-) Gabriel ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 2003-09-01 11:46 ` Gabriel Paubert @ 2003-09-01 12:59 ` Frank Murphy 2003-09-02 12:12 ` Gabriel Paubert 0 siblings, 1 reply; 14+ messages in thread From: Frank Murphy @ 2003-09-01 12:59 UTC (permalink / raw) To: Gabriel Paubert; +Cc: linuxppc-dev On Monday 01 September 2003 1:46, Gabriel Paubert wrote: > > Yeah, the keycode/scancode/keysym stuff is a twisty maze. I do have the > > hardware to test these changes, if you have a guess to what they should > > be. > > What keyboard(s) do you have ? I have an original iBook with its built-in US layout keyboard. I also have a "narrow" iMac US keyboard (F1-F12 and no Delete or Insert key). I also have access to a UK Apple Pro Keyboard. This is the one with the F13, F14, & F15 keys. > I've only access to my Pismo now, and it obviously does not have the > F13-F15 keys. I shall be back in front on my G4 in a few days. > > I'd first need to know what "showkey -k" and "showkey -s" give for these > 3 keys on your keybord. In the order F13, F14, then F15, with showkey -k, I get 85, 115, and 119. With showkey -s, I get 0x55 0xd5, 0x73 0xf3, and 0x77 0xf7. Frank ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 2003-09-01 12:59 ` Frank Murphy @ 2003-09-02 12:12 ` Gabriel Paubert 2003-09-02 15:59 ` Frank Murphy 0 siblings, 1 reply; 14+ messages in thread From: Gabriel Paubert @ 2003-09-02 12:12 UTC (permalink / raw) To: Frank Murphy; +Cc: linuxppc-dev On Mon, Sep 01, 2003 at 02:59:21PM +0200, Frank Murphy wrote: > > On Monday 01 September 2003 1:46, Gabriel Paubert wrote: > > > Yeah, the keycode/scancode/keysym stuff is a twisty maze. I do have the > > > hardware to test these changes, if you have a guess to what they should > > > be. > > > > What keyboard(s) do you have ? > > I have an original iBook with its built-in US layout keyboard. I also have a > "narrow" iMac US keyboard (F1-F12 and no Delete or Insert key). I also have > access to a UK Apple Pro Keyboard. This is the one with the F13, F14, & F15 > keys. > > > I've only access to my Pismo now, and it obviously does not have the > > F13-F15 keys. I shall be back in front on my G4 in a few days. > > > > I'd first need to know what "showkey -k" and "showkey -s" give for these > > 3 keys on your keybord. > > In the order F13, F14, then F15, with showkey -k, I get 85, 115, and 119. > With showkey -s, I get 0x55 0xd5, 0x73 0xf3, and 0x77 0xf7. What? Exactly the same code for keycodes and scancodes? (85=0x55, 115=0x73, 119=0x77) Gabriel P.S: I'm going to be a lot less responsive the rest of the week, I'm having a few free days right now after having worked all over the week-end. ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 2003-09-02 12:12 ` Gabriel Paubert @ 2003-09-02 15:59 ` Frank Murphy 2003-09-08 9:03 ` Frank Murphy 0 siblings, 1 reply; 14+ messages in thread From: Frank Murphy @ 2003-09-02 15:59 UTC (permalink / raw) To: Gabriel Paubert; +Cc: linuxppc-dev On Tuesday 02 September 2003 2:12, Gabriel Paubert wrote: > On Mon, Sep 01, 2003 at 02:59:21PM +0200, Frank Murphy wrote: > > On Monday 01 September 2003 1:46, Gabriel Paubert wrote: > > > I've only access to my Pismo now, and it obviously does not have the > > > F13-F15 keys. I shall be back in front on my G4 in a few days. > > > > > > I'd first need to know what "showkey -k" and "showkey -s" give for > > > these 3 keys on your keybord. > > > > In the order F13, F14, then F15, with showkey -k, I get 85, 115, and 119. > > With showkey -s, I get 0x55 0xd5, 0x73 0xf3, and 0x77 0xf7. > > What? Exactly the same code for keycodes and scancodes? > > (85=0x55, 115=0x73, 119=0x77) Exactly the same. I just double-checked. F13 = 85 / 0x55 0xd5 F14 = 115 / 0x73 0xf3 F15 = 119 / 0x77 0xf7 > P.S: I'm going to be a lot less responsive the rest of the week, I'm > having a few free days right now after having worked all over the > week-end. Enjoy the time off. Frank ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linux kernel / USB keyboard scancode problems 2003-09-02 15:59 ` Frank Murphy @ 2003-09-08 9:03 ` Frank Murphy 0 siblings, 0 replies; 14+ messages in thread From: Frank Murphy @ 2003-09-08 9:03 UTC (permalink / raw) To: Frank Murphy, Gabriel Paubert; +Cc: linuxppc-dev On Tue, 2 Sep 2003 17:59:12 +0200, "Frank Murphy" <murphyf+linux-ppc@f-m.fm> said: > On Tuesday 02 September 2003 2:12, Gabriel Paubert wrote: > > On Mon, Sep 01, 2003 at 02:59:21PM +0200, Frank Murphy wrote: > > > On Monday 01 September 2003 1:46, Gabriel Paubert wrote: > > > > I've only access to my Pismo now, and it obviously does not have the > > > > F13-F15 keys. I shall be back in front on my G4 in a few days. > > > > > > > > I'd first need to know what "showkey -k" and "showkey -s" give for > > > > these 3 keys on your keybord. > > > > > > In the order F13, F14, then F15, with showkey -k, I get 85, 115, and 119. > > > With showkey -s, I get 0x55 0xd5, 0x73 0xf3, and 0x77 0xf7. > > > > What? Exactly the same code for keycodes and scancodes? > > > > (85=0x55, 115=0x73, 119=0x77) > > Exactly the same. I just double-checked. > > F13 = 85 / 0x55 0xd5 > F14 = 115 / 0x73 0xf3 > F15 = 119 / 0x77 0xf7 So you had seemed surprised that the keycodes and scancodes were exactly the same. Do you have an idea why that might be? Frank -- http://www.fastmail.fm - Or how I learned to stop worrying and love email again ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/ ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2003-09-08 9:03 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
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).