linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6.0-test1/2: keyboard funnies in textmode
@ 2003-08-01 14:25 Jurgen Kramer
  2003-08-01 14:52 ` Andries Brouwer
  0 siblings, 1 reply; 8+ messages in thread
From: Jurgen Kramer @ 2003-08-01 14:25 UTC (permalink / raw)
  To: linux-kernel

Hi,

With both 2.6.0-test1 and test2 I am unable to use
de pipe (|) key in textmode (??). When in X it works again.
I have tested this on 2 machines. One machine is a laptop with Japanese
keyboard the other a regular PC with wireless Logitech USB keyboard.

All the other keys seem to work properly...anyone else with this strange
problem?

Greetings,

Jurgen



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.0-test1/2: keyboard funnies in textmode
  2003-08-01 14:25 2.6.0-test1/2: keyboard funnies in textmode Jurgen Kramer
@ 2003-08-01 14:52 ` Andries Brouwer
  2003-08-01 15:33   ` Jurgen Kramer
  0 siblings, 1 reply; 8+ messages in thread
From: Andries Brouwer @ 2003-08-01 14:52 UTC (permalink / raw)
  To: Jurgen Kramer; +Cc: linux-kernel

On Fri, Aug 01, 2003 at 04:25:45PM +0200, Jurgen Kramer wrote:

> With both 2.6.0-test1 and test2 I am unable to use
> de pipe (|) key in textmode (??). When in X it works again.
> I have tested this on 2 machines. One machine is a laptop with Japanese
> keyboard the other a regular PC with wireless Logitech USB keyboard.
> 
> All the other keys seem to work properly...anyone else with this strange
> problem?

Can you give some details?

- When did it last work?
- What does it mean: "am unable to use"?
(Is the key ignored? Does the system crash? Do you get different keycodes?)
- What are the boot messages about the keyboard?

The pipe key is the same as the backslash key (say, on a US keyboard).
And there is some interesting confusion between Yen and Backslash
(since ASCII and JIS-Roman coincide, except in the yen and overbar
positions, where ASCII has backslash and tilde).
So, I am not surprised by weird things on a Japanese keyboard.

Do you use scancode Set 3?

Andries


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.0-test1/2: keyboard funnies in textmode
  2003-08-01 14:52 ` Andries Brouwer
@ 2003-08-01 15:33   ` Jurgen Kramer
  2003-08-01 16:37     ` Andries Brouwer
  0 siblings, 1 reply; 8+ messages in thread
From: Jurgen Kramer @ 2003-08-01 15:33 UTC (permalink / raw)
  To: Andries Brouwer; +Cc: linux-kernel

On Fri, 2003-08-01 at 16:52, Andries Brouwer wrote:

> Can you give some details?
> 
> - When did it last work?

OK, I no longer have compiled 2.5 kernels installed, only 2.6.0-test1/2.
I can only say it does work normally under 2.4.x.
 
> - What does it mean: "am unable to use"?
> (Is the key ignored? Does the system crash? Do you get different keycodes?)
On the laptop with Japanese keyboard the Yen/Pipe key is totally dead.
On the regular PC with USB keyboard only the backslash works. 

How can I check keycodes while in textmode?

> - What are the boot messages about the keyboard?
> 
Very annoying, I can't type dmesg | grep keyboard while in textmode..:-(
But from X:

>From the laptop (2.6.0-test1):
input: PS/2 Generic Mouse on isa0060/serio4
input: AT Set 2 keyboard on isa0060/serio0

>From the PC (2.6.0-test2):
input: USB HID v1.10 Keyboard [Logitech USB Receiver] on
usb-0000:00:1d.1-2
input: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:1d.1-2

> The pipe key is the same as the backslash key (say, on a US keyboard).
> And there is some interesting confusion between Yen and Backslash
> (since ASCII and JIS-Roman coincide, except in the yen and overbar
> positions, where ASCII has backslash and tilde).
> So, I am not surprised by weird things on a Japanese keyboard.
> Do you use scancode Set 3?
Above shows Set 2 for the laptop. I can't tell for the PC.

Cheers,

Jurgen


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.0-test1/2: keyboard funnies in textmode
  2003-08-01 15:33   ` Jurgen Kramer
@ 2003-08-01 16:37     ` Andries Brouwer
  2003-08-01 17:56       ` Jurgen Kramer
  0 siblings, 1 reply; 8+ messages in thread
From: Andries Brouwer @ 2003-08-01 16:37 UTC (permalink / raw)
  To: Jurgen Kramer; +Cc: linux-kernel

On Fri, Aug 01, 2003 at 05:33:31PM +0200, Jurgen Kramer wrote:

> How can I check keycodes while in textmode?

The usual answer is "showkeys" for keycodes, "showkeys -s"
for scancodes. On 2.6 some cheating is involved, since the
driver first translates and then untranslates, so raw mode
is not exactly raw anymore, and replies may be wrong.

For the backslash/pipe key you expect scancode 0x2b
(in the default, translated scancode Set 2) and keycode 43.
X uses its own keycodes, maybe it will be 51, haven't checked.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.0-test1/2: keyboard funnies in textmode
  2003-08-01 16:37     ` Andries Brouwer
@ 2003-08-01 17:56       ` Jurgen Kramer
  2003-08-01 20:16         ` Andries Brouwer
  2003-08-01 22:16         ` Andries Brouwer
  0 siblings, 2 replies; 8+ messages in thread
From: Jurgen Kramer @ 2003-08-01 17:56 UTC (permalink / raw)
  To: Andries Brouwer; +Cc: linux-kernel

On Fri, 2003-08-01 at 18:37, Andries Brouwer wrote:

> The usual answer is "showkeys" for keycodes, "showkeys -s"
> for scancodes. On 2.6 some cheating is involved, since the
> driver first translates and then untranslates, so raw mode
> is not exactly raw anymore, and replies may be wrong.
> 

OK here it goes:

Laptop 2.4 showkey:
kb mode was UNICODE
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
keycode  28 release
keycode 124 press
keycode 124 release
keycode 124 press
keycode 124 release
keycode 124 press
keycode 124 release

Laptop 2.4 showkey -s:
0x7d
0xfd
0x7d
0xfd
0x7d
0xfd
0x2a
0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a
0x2a 0x2a
0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a
0x7d
0xfd
0x7d
0xfd
0x7d
0xfd 0xaa



Laptop 2.6 showkey:
keycode	0 press
keycode 1 release
keycode 55 release
keycode 0 release
keycode 1 release
keycode 55 release

Laptop 2.6 showkey -s:
0x7d
0xfd
0x7d
0xfd
0x7d
0xfd


PC 2.4 showkey:
keycode  43 release
keycode  43 press
keycode  43 release
keycode  43 press
keycode  43 release

PC 2.4 showkey -s:
0x2b 0xab
0x2b 0xab
0x2a
0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2b 0xab
0x2b
0xab 0xaa

PC 2.6 showkey:
keycode  84 press
keycode  84 release
keycode  84 press
keycode  84 release

PC 2.6 showkey -s:
0x2b 0xab
0x2b 0xab
0x2a
0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2b 0xab
0x2b 0xab 0xaa

The difference between 2.4 and 2.6 on the laptop are very weird. 
Hope this helps.

Greetings,

Jurgen



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.0-test1/2: keyboard funnies in textmode
  2003-08-01 17:56       ` Jurgen Kramer
@ 2003-08-01 20:16         ` Andries Brouwer
  2003-08-01 22:16         ` Andries Brouwer
  1 sibling, 0 replies; 8+ messages in thread
From: Andries Brouwer @ 2003-08-01 20:16 UTC (permalink / raw)
  To: Jurgen Kramer; +Cc: linux-kernel

On Fri, Aug 01, 2003 at 07:56:04PM +0200, Jurgen Kramer wrote:

> Laptop 2.4 showkey:
> keycode 124
> 
> Laptop 2.6 showkey:
> keycode 0 press
> keycode 1 release
> keycode 55 release
> keycode 0 release
> keycode 1 release
> keycode 55 release
> 
> Laptop 2.6 showkey -s:
> 0x7d
> 0xfd
> 0x7d
> 0xfd
> 0x7d
> 0xfd

Aha - this is a problem we have seen a few more times recently.
Scancode 0x7d, well-known from Japanese keyboards, has keycode 124
under 2.4 and keycode 183 under 2.6.

There are many solutions, and searching for "keycode 183" will
show you a few. A quick-n-dirty solution for you is to replace
the 183 in the array atkbd_set2_keycode[] in atkbd.c by 124.

Will look at your USB problem later.

Andries


[PS - Your strange 1,55 release is because 1*128+55 = 183.
The new kernel breaks old keyboard utilities. Bad.]


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.0-test1/2: keyboard funnies in textmode
  2003-08-01 17:56       ` Jurgen Kramer
  2003-08-01 20:16         ` Andries Brouwer
@ 2003-08-01 22:16         ` Andries Brouwer
  2003-08-10 18:40           ` Mikael Magnusson
  1 sibling, 1 reply; 8+ messages in thread
From: Andries Brouwer @ 2003-08-01 22:16 UTC (permalink / raw)
  To: Jurgen Kramer; +Cc: linux-kernel

On Fri, Aug 01, 2003 at 07:56:04PM +0200, Jurgen Kramer wrote:

> PC 2.4 showkey:
> keycode  43 release
> keycode  43 press
> 
> PC 2.6 showkey:
> keycode  84 press
> keycode  84 release

Funny indeed.

The USB standards define USB code 49 for the US \| key,
USB code 50 for the non-US \| key (French mu, etc),
and USB code 137 for the Japanese Yen |.
So, you should get one of these.

This USB code is translated to a Linux keycode in
usb_kbd_keycode[] in usbkbd.c.
The three possible translations are 43, 84, 183.

Maybe you can check for yourself (e.g. with a printk in usbkbd.c)
that you really get different USB codes from that keyboard under
2.4 and 2.6?

Maybe the code one gets depends on the initialization of the keyboard.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: 2.6.0-test1/2: keyboard funnies in textmode
  2003-08-01 22:16         ` Andries Brouwer
@ 2003-08-10 18:40           ` Mikael Magnusson
  0 siblings, 0 replies; 8+ messages in thread
From: Mikael Magnusson @ 2003-08-10 18:40 UTC (permalink / raw)
  To: linux-kernel

On Sat, Aug 02, 2003 at 12:16:27AM +0200, Andries Brouwer wrote:
> On Fri, Aug 01, 2003 at 07:56:04PM +0200, Jurgen Kramer wrote:
> 
> > PC 2.4 showkey:
> > keycode  43 release
> > keycode  43 press
> > 
> > PC 2.6 showkey:
> > keycode  84 press
> > keycode  84 release
> 

I have got the same problem in 2.6.0-test3 with a swedish USB keyboard. 
It's a Microsoft Natural Keyboard pro. The "'/*" key generates keycode 
43 in 2.4.21 and keycode 84 in 2.6.0-test3. But my swedish AT keyboard 
still generates the same keycode (43) in both releases.

I have tried to find what caused the change. In 2.4 keycode 84 is 
translated to 43 by x86_keycodes table in drivers/input/keybdev.c. But 
in 2.6 I think the table is used only in raw mode, otherwise the keymap 
is used directly (in drivers/char/keyboard.c). 

My workaround is to define keycode 84 in the keymap file/s. I have added 
the following to my US keymap:

keycode  84 = backslash        bar
        control keycode  84 = Control_backslash

Regards,
Mikael Magnusson

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-08-10 18:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-01 14:25 2.6.0-test1/2: keyboard funnies in textmode Jurgen Kramer
2003-08-01 14:52 ` Andries Brouwer
2003-08-01 15:33   ` Jurgen Kramer
2003-08-01 16:37     ` Andries Brouwer
2003-08-01 17:56       ` Jurgen Kramer
2003-08-01 20:16         ` Andries Brouwer
2003-08-01 22:16         ` Andries Brouwer
2003-08-10 18:40           ` Mikael Magnusson

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).