Commit 87d35488 authored by Roland Mainz's avatar Roland Mainz
Browse files

//bugs.freedesktop.org/show_bug.cgi?id=1651) attachment #1484

    (https://bugs.freedesktop.org/attachment.cgi?id=1484):
- set default XkbModel to pc105 (like legacy keyboard driver did)
- fix autorepeat Patch by Matthieu Herrb and Petter Urkedal
parent b9bece29
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.5 2004/08/29 21:06:00 kem Exp $ */ /* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.8 2004/12/06 21:51:11 herrb Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.8 2003/11/03 05:11:47 tsi Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.8 2003/11/03 05:11:47 tsi Exp $ */
/* /*
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* xf86Events.c and xf86Io.c which are * xf86Events.c and xf86Io.c which are
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
*/ */
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.5 2004/08/29 21:06:00 kem Exp $ */ /* $XdotOrg: xc/programs/Xserver/hw/xfree86/input/keyboard/kbd.c,v 1.8 2004/12/06 21:51:11 herrb Exp $ */
#define NEED_EVENTS #define NEED_EVENTS
#include "X.h" #include "X.h"
...@@ -135,7 +135,7 @@ static const char *kbdDefaults[] = { ...@@ -135,7 +135,7 @@ static const char *kbdDefaults[] = {
"Protocol", "standard", "Protocol", "standard",
"AutoRepeat", "500 30", "AutoRepeat", "500 30",
"XkbRules", __XKBDEFRULES__, "XkbRules", __XKBDEFRULES__,
"XkbModel", "pc101", "XkbModel", "pc105",
"XkbLayout", "us", "XkbLayout", "us",
"Panix106", "off", "Panix106", "off",
"CustomKeycodes", "off", "CustomKeycodes", "off",
...@@ -372,6 +372,7 @@ KbdCtrl( DeviceIntPtr device, KeybdCtrl *ctrl) ...@@ -372,6 +372,7 @@ KbdCtrl( DeviceIntPtr device, KeybdCtrl *ctrl)
} }
#endif #endif
pKbd->SetLeds(pInfo, pKbd->leds); pKbd->SetLeds(pInfo, pKbd->leds);
pKbd->autoRepeat = ctrl->autoRepeat;
return (Success); return (Success);
} }
...@@ -720,14 +721,14 @@ PostKbdEvent(InputInfoPtr pInfo, unsigned int scanCode, Bool down) ...@@ -720,14 +721,14 @@ PostKbdEvent(InputInfoPtr pInfo, unsigned int scanCode, Bool down)
/* /*
* check for an autorepeat-event * check for an autorepeat-event
*/ */
if (down) { if (down && KeyPressed(keycode)) {
int num = keycode >> 3; int num = keycode >> 3;
int bit = 1 << (keycode & 7); int bit = 1 << (keycode & 7);
if ((keyc->down[num] & bit) &&
((kbdfeed->ctrl.autoRepeat != AutoRepeatModeOn) || if ((pKbd->autoRepeat != AutoRepeatModeOn) ||
keyc->modifierMap[keycode] || keyc->modifierMap[keycode] ||
!(kbdfeed->ctrl.autoRepeats[num] & bit))) !(kbdfeed->ctrl.autoRepeats[num] & bit))
return; return;
} }
if (UsePrefix) { if (UsePrefix) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment