Synced with following changes:

>yokota      2000/01/11 05:39:06 PST
>
>  Modified files:
>    sys/dev/usb          ukbd.c
>    sys/dev/kbd          atkbd.c kbd.c kbdreg.h
>  Log:
>  Rework shifta/ctla/alta key handling.  It appears that there was
>  misunderstanding between the PR originator and me.  I hope I got it
>  right this time.
>
>  Revision  Changes    Path
>  1.22      +4 -1      src/sys/dev/usb/ukbd.c
>  1.21      +1 -8      src/sys/dev/kbd/atkbd.c
>  1.16      +19 -10    src/sys/dev/kbd/kbd.c
>  1.9       +2 -2      src/sys/dev/kbd/kbdreg.h

Submitted by:	yokota
This commit is contained in:
KATO Takenori 2000-01-13 11:47:42 +00:00
parent 50a2971692
commit a9d02f5a66
2 changed files with 0 additions and 14 deletions

View File

@ -597,27 +597,23 @@ pckbd_read_char(keyboard_t *kbd, int wait)
case 0x42: case 0x43: case 0x44: /* keypad 7,8,9 */
state->ks_composed_char *= 10;
state->ks_composed_char += scancode - 0x3B;
kbd->kb_prev_key = keycode | (scancode & 0x80);
if (state->ks_composed_char > UCHAR_MAX)
return ERRKEY;
goto next_code;
case 0x46: case 0x47: case 0x48: /* keypad 4,5,6 */
state->ks_composed_char *= 10;
state->ks_composed_char += scancode - 0x42;
kbd->kb_prev_key = keycode | (scancode & 0x80);
if (state->ks_composed_char > UCHAR_MAX)
return ERRKEY;
goto next_code;
case 0x4A: case 0x4B: case 0x4C: /* keypad 1,2,3 */
state->ks_composed_char *= 10;
state->ks_composed_char += scancode - 0x49;
kbd->kb_prev_key = keycode | (scancode & 0x80);
if (state->ks_composed_char > UCHAR_MAX)
return ERRKEY;
goto next_code;
case 0x4E: /* keypad 0 */
state->ks_composed_char *= 10;
kbd->kb_prev_key = keycode | (scancode & 0x80);
if (state->ks_composed_char > UCHAR_MAX)
return ERRKEY;
goto next_code;
@ -627,7 +623,6 @@ pckbd_read_char(keyboard_t *kbd, int wait)
case 0xC6: case 0xC7: case 0xC8: /* keypad 4,5,6 */
case 0xCA: case 0xCB: case 0xCC: /* keypad 1,2,3 */
case 0xCE: /* keypad 0 */
kbd->kb_prev_key = keycode | (scancode & 0x80);
goto next_code;
case 0x73: /* GRPH key */
@ -637,7 +632,6 @@ pckbd_read_char(keyboard_t *kbd, int wait)
if (state->ks_composed_char > 0) {
state->ks_flags &= ~COMPOSE;
state->ks_composed_char = 0;
kbd->kb_prev_key = keycode | (scancode & 0x80);
return ERRKEY;
}
break;
@ -647,7 +641,6 @@ pckbd_read_char(keyboard_t *kbd, int wait)
/* keycode to key action */
action = genkbd_keyaction(kbd, keycode, scancode & 0x80,
&state->ks_state, &state->ks_accents);
kbd->kb_prev_key = keycode | (scancode & 0x80);
if (action == NOKEY)
goto next_code;
else

View File

@ -597,27 +597,23 @@ pckbd_read_char(keyboard_t *kbd, int wait)
case 0x42: case 0x43: case 0x44: /* keypad 7,8,9 */
state->ks_composed_char *= 10;
state->ks_composed_char += scancode - 0x3B;
kbd->kb_prev_key = keycode | (scancode & 0x80);
if (state->ks_composed_char > UCHAR_MAX)
return ERRKEY;
goto next_code;
case 0x46: case 0x47: case 0x48: /* keypad 4,5,6 */
state->ks_composed_char *= 10;
state->ks_composed_char += scancode - 0x42;
kbd->kb_prev_key = keycode | (scancode & 0x80);
if (state->ks_composed_char > UCHAR_MAX)
return ERRKEY;
goto next_code;
case 0x4A: case 0x4B: case 0x4C: /* keypad 1,2,3 */
state->ks_composed_char *= 10;
state->ks_composed_char += scancode - 0x49;
kbd->kb_prev_key = keycode | (scancode & 0x80);
if (state->ks_composed_char > UCHAR_MAX)
return ERRKEY;
goto next_code;
case 0x4E: /* keypad 0 */
state->ks_composed_char *= 10;
kbd->kb_prev_key = keycode | (scancode & 0x80);
if (state->ks_composed_char > UCHAR_MAX)
return ERRKEY;
goto next_code;
@ -627,7 +623,6 @@ pckbd_read_char(keyboard_t *kbd, int wait)
case 0xC6: case 0xC7: case 0xC8: /* keypad 4,5,6 */
case 0xCA: case 0xCB: case 0xCC: /* keypad 1,2,3 */
case 0xCE: /* keypad 0 */
kbd->kb_prev_key = keycode | (scancode & 0x80);
goto next_code;
case 0x73: /* GRPH key */
@ -637,7 +632,6 @@ pckbd_read_char(keyboard_t *kbd, int wait)
if (state->ks_composed_char > 0) {
state->ks_flags &= ~COMPOSE;
state->ks_composed_char = 0;
kbd->kb_prev_key = keycode | (scancode & 0x80);
return ERRKEY;
}
break;
@ -647,7 +641,6 @@ pckbd_read_char(keyboard_t *kbd, int wait)
/* keycode to key action */
action = genkbd_keyaction(kbd, keycode, scancode & 0x80,
&state->ks_state, &state->ks_accents);
kbd->kb_prev_key = keycode | (scancode & 0x80);
if (action == NOKEY)
goto next_code;
else