Fixed the handling of the Toshiba Fn keys, fixes #2778.
This commit is contained in:
@@ -140,10 +140,10 @@ keyboard_input(int down, uint16_t scan)
|
||||
if (recv_key[scan & 0x1ff] ^ down) {
|
||||
if (down) {
|
||||
switch (scan & 0x1ff) {
|
||||
case 0x01c: /* Left Ctrl */
|
||||
case 0x01d: /* Left Ctrl */
|
||||
shift |= 0x01;
|
||||
break;
|
||||
case 0x11c: /* Right Ctrl */
|
||||
case 0x11d: /* Right Ctrl */
|
||||
shift |= 0x10;
|
||||
break;
|
||||
case 0x02a: /* Left Shift */
|
||||
@@ -161,10 +161,10 @@ keyboard_input(int down, uint16_t scan)
|
||||
}
|
||||
} else {
|
||||
switch (scan & 0x1ff) {
|
||||
case 0x01c: /* Left Ctrl */
|
||||
case 0x01d: /* Left Ctrl */
|
||||
shift &= ~0x01;
|
||||
break;
|
||||
case 0x11c: /* Right Ctrl */
|
||||
case 0x11d: /* Right Ctrl */
|
||||
shift &= ~0x10;
|
||||
break;
|
||||
case 0x02a: /* Left Shift */
|
||||
|
@@ -866,7 +866,7 @@ add_data_kbd(uint16_t val)
|
||||
}
|
||||
|
||||
/* Test for T3100E 'Fn' key (Right Alt / Right Ctrl) */
|
||||
if ((dev != NULL) && (kbc_ven == KBC_VEN_TOSHIBA) && (keyboard_recv(0xb8) || keyboard_recv(0x9d)))
|
||||
if ((dev != NULL) && (kbc_ven == KBC_VEN_TOSHIBA) && (keyboard_recv(0x138) || keyboard_recv(0x11d)))
|
||||
switch (val) {
|
||||
case 0x4f:
|
||||
t3100e_notify_set(0x01);
|
||||
|
@@ -429,7 +429,7 @@ kbd_adddata(uint16_t val)
|
||||
{
|
||||
/* Test for T1000 'Fn' key (Right Alt / Right Ctrl) */
|
||||
if (is_t1x00) {
|
||||
if (keyboard_recv(0xb8) || keyboard_recv(0x9d)) { /* 'Fn' pressed */
|
||||
if (keyboard_recv(0x138) || keyboard_recv(0x11d)) { /* 'Fn' pressed */
|
||||
t1000_syskey(0x00, 0x04, 0x00); /* Set 'Fn' indicator */
|
||||
switch (val) {
|
||||
case 0x45: /* Num Lock => toggle numpad */
|
||||
|
@@ -150,6 +150,7 @@ extern const device_t keyboard_pravetz_device;
|
||||
extern const device_t keyboard_xt_device;
|
||||
extern const device_t keyboard_xt86_device;
|
||||
extern const device_t keyboard_xt_compaq_device;
|
||||
extern const device_t keyboard_xt_t1x00_device;
|
||||
extern const device_t keyboard_tandy_device;
|
||||
# if defined(DEV_BRANCH) && defined(USE_LASERXT)
|
||||
extern const device_t keyboard_xt_lxt3_device;
|
||||
|
Reference in New Issue
Block a user