summaryrefslogtreecommitdiff
path: root/driver/xf86-input-keyboard/src/kbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/xf86-input-keyboard/src/kbd.c')
-rw-r--r--driver/xf86-input-keyboard/src/kbd.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/driver/xf86-input-keyboard/src/kbd.c b/driver/xf86-input-keyboard/src/kbd.c
index 4496c6b5e..ea5480b13 100644
--- a/driver/xf86-input-keyboard/src/kbd.c
+++ b/driver/xf86-input-keyboard/src/kbd.c
@@ -88,14 +88,6 @@ static const char *kbdDefaults[] = {
NULL
};
-static const char *kbd98Defaults[] = {
- "Protocol", "standard",
- "XkbRules", "xfree98",
- "XkbModel", "pc98",
- "XkbLayout", "jp",
- NULL
-};
-
static char *xkb_rules;
static char *xkb_model;
static char *xkb_layout;
@@ -158,10 +150,7 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
pInfo->fd = -1;
pInfo->dev = NULL;
- if (!xf86IsPc98())
- defaults = kbdDefaults;
- else
- defaults = kbd98Defaults;
+ defaults = kbdDefaults;
xf86CollectInputOptions(pInfo, defaults
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
, NULL
@@ -385,6 +374,9 @@ KbdProc(DeviceIntPtr device, int what)
pKbd->KbdOff(pInfo, what);
device->public.on = FALSE;
break;
+
+ default:
+ return BadValue;
}
return (Success);
}
@@ -396,6 +388,7 @@ PostKbdEvent(InputInfoPtr pInfo, unsigned int scanCode, Bool down)
KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
DeviceIntPtr device = pInfo->dev;
KeyClassRec *keyc = device->key;
+ int state;
#ifdef DEBUG
ErrorF("kbd driver rec scancode: 0x02%x %s\n", scanCode, down?"down":"up");
@@ -422,16 +415,12 @@ PostKbdEvent(InputInfoPtr pInfo, unsigned int scanCode, Bool down)
* physical keyboard key.
*/
- if (!xf86IsPc98()) {
- int state;
-
- state = XkbStateFieldFromRec(&keyc->xkbInfo->state);
+ state = XkbStateFieldFromRec(&keyc->xkbInfo->state);
- if (((state & AltMask) == AltMask) && (scanCode == KEY_SysReqest))
- scanCode = KEY_Print;
- else if (scanCode == KEY_Break)
- scanCode = KEY_Pause;
- }
+ if (((state & AltMask) == AltMask) && (scanCode == KEY_SysReqest))
+ scanCode = KEY_Print;
+ else if (scanCode == KEY_Break)
+ scanCode = KEY_Pause;
xf86PostKeyboardEvent(device, scanCode + MIN_KEYCODE, down);
}