[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: keyboard problems



> I've got a keyboard problem with the right shift key that I'm hoping for
> some help on.

ADB or USB keyboard?

For ADB keyboards, this might explain part of it:

int mackbd_translate(unsigned char keycode, unsigned char *keycodep,
                     char raw_mode)
{
 	if (!raw_mode) {
 	        /*
 	         * Convert R-shift/control/option to L version.
 	         */
 	        switch (keycode) {
 	        case 0x7b: keycode = 0x38; break; /* R-shift */
 	        case 0x7c: keycode = 0x3a; break; /* R-option */
 	        case 0x7d: keycode = 0x36; break; /* R-control */
 	        }
 	}
 	*keycodep = keycode;
 	return 1;
}

The right shift keycode is translated to the left shift keycode which is
what you see in the showkey log. Now why there's a duplicated key event
for right shift I don't know. It doesn't happen for me. Maybe the keyboard
is configured to send the same keycode for both shift and option keys
anyway - at least I don't get a second key down on pressing the second
shift key.

	Michael



Reply to: