Re: [PATCH] amiga input api drivers

Geert Uytterhoeven (geert@linux-m68k.org)
Fri, 1 Feb 2002 10:10:42 +0100 (MET)


On Fri, 1 Feb 2002, Simon Richter wrote:
> On Fri, 1 Feb 2002, Roman Zippel wrote:
> > > > > + scancode = scancode >> 1; /* lowest bit is release bit */
> > > > > + down = scancode & 1;
>
> > He's correct, the up/down event is received in the lsb bit, the other 7
> > bits are the keycode.
>
> Well, I'm also unsure you mean the LSB here -- The hardware manual says
> that bit 7 indicates that the key had been released.

Yes, but that's after rotating. The old code did

/* rotate scan code to get up/down bit in proper position */
scancode = ((scancode >> 1) & 0x7f) | ((scancode << 7) & 0x80);

first.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/