All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix braille keyboard keysym generation
@ 2009-11-17 13:51 Samuel Thibault
  2009-11-20 21:19 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Thibault @ 2009-11-17 13:51 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, alan

Keysyms stored in key_map[] are not simply K() values, but U(K())
values, as can be seen in the KDSKBENT ioctl handler.  The
kernel-generated braille keysyms thus need a U() call too.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index 737be95..82c493e 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -1249,7 +1249,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
 
 	if (keycode >= NR_KEYS)
 		if (keycode >= KEY_BRL_DOT1 && keycode <= KEY_BRL_DOT8)
-			keysym = K(KT_BRL, keycode - KEY_BRL_DOT1 + 1);
+			keysym = U(K(KT_BRL, keycode - KEY_BRL_DOT1 + 1));
 		else
 			return;
 	else

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

* Re: [PATCH] Fix braille keyboard keysym generation
  2009-11-17 13:51 [PATCH] Fix braille keyboard keysym generation Samuel Thibault
@ 2009-11-20 21:19 ` Andrew Morton
  2009-11-20 23:01   ` Samuel Thibault
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2009-11-20 21:19 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: linux-kernel, alan

On Tue, 17 Nov 2009 14:51:11 +0100
Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:

> Keysyms stored in key_map[] are not simply K() values, but U(K())
> values, as can be seen in the KDSKBENT ioctl handler.  The
> kernel-generated braille keysyms thus need a U() call too.
> 
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> 
> diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
> index 737be95..82c493e 100644
> --- a/drivers/char/keyboard.c
> +++ b/drivers/char/keyboard.c
> @@ -1249,7 +1249,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
>  
>  	if (keycode >= NR_KEYS)
>  		if (keycode >= KEY_BRL_DOT1 && keycode <= KEY_BRL_DOT8)
> -			keysym = K(KT_BRL, keycode - KEY_BRL_DOT1 + 1);
> +			keysym = U(K(KT_BRL, keycode - KEY_BRL_DOT1 + 1));
>  		else
>  			return;
>  	else

Sorry, but I cannot work out (with a reasonable amount of effort) what
the user-visible effects of this bug are likely to be.  So I am not in
a position to decide which kernel(s) this patch should be merged into.

Please be careful to include this aspect in the changelog when
appropriate, thanks.


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

* Re: [PATCH] Fix braille keyboard keysym generation
  2009-11-20 21:19 ` Andrew Morton
@ 2009-11-20 23:01   ` Samuel Thibault
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Thibault @ 2009-11-20 23:01 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, alan

Andrew Morton, le Fri 20 Nov 2009 13:19:54 -0800, a écrit :
> >  	if (keycode >= NR_KEYS)
> >  		if (keycode >= KEY_BRL_DOT1 && keycode <= KEY_BRL_DOT8)
> > -			keysym = K(KT_BRL, keycode - KEY_BRL_DOT1 + 1);
> > +			keysym = U(K(KT_BRL, keycode - KEY_BRL_DOT1 + 1));
> >  		else
> >  			return;
> >  	else
> 
> Sorry, but I cannot work out (with a reasonable amount of effort) what
> the user-visible effects of this bug are likely to be.  So I am not in
> a position to decide which kernel(s) this patch should be merged into.

It will make braille keyboards actually work.  Apparently I had never
really tried it and so it has never worked up to now.

> Please be careful to include this aspect in the changelog when
> appropriate, thanks.

Right, sorry.  Braille keyboards announced as KEY_BRL_DOT* are still
pretty rare (that's why the bug completely went unnoticed from the
start), so it's maybe not worth including the patch in the stable
kernels, but making it for 2.6.32 would be a good thing.

Samuel

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

end of thread, other threads:[~2009-11-20 23:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-17 13:51 [PATCH] Fix braille keyboard keysym generation Samuel Thibault
2009-11-20 21:19 ` Andrew Morton
2009-11-20 23:01   ` Samuel Thibault

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.