int mapWidth;
unsigned int i;
int j, k, state, maxKeysPerMod;
+#if XORG >= 17
+ KeybdCtrl ctrl;
+#endif
initInputDevice();
maxKeyCode = keymap->maxKeyCode;
mapWidth = keymap->mapWidth;
+#if XORG >= 17
+ /*
+ * No server-side key repeating, please. Some clients won't work well,
+ * check https://bugzilla.redhat.com/show_bug.cgi?id=607866.
+ */
+ ctrl = keyboardDev->kbdfeed->ctrl;
+ if (ctrl.autoRepeat != FALSE) {
+ ctrl.autoRepeat = FALSE;
+ XkbSetRepeatKeys(keyboardDev, -1, ctrl.autoRepeat);
+ }
+#endif
+
/* find which modifier Mode_switch is on. */
int modeSwitchMapIndex = 0;
for (i = 3; i < 8; i++) {