diff --git a/share/man/man4/ukbd.4 b/share/man/man4/ukbd.4 --- a/share/man/man4/ukbd.4 +++ b/share/man/man4/ukbd.4 @@ -136,6 +136,15 @@ .D1 Cd "options KBD_DISABLE_KEYMAP_LOADING" .Pp Do not allow the user to change the keymap. +.Pp +.D1 Cd "options KBD_DELAY1=200" +.Pp +Set the keyboard initial key repeat delay. +.Pp +.D1 Cd "options KBD_DELAY2=15" +.Pp +Set the keyboard key repeat delay. +.Pp Note that these options also affect the AT keyboard driver, .Xr atkbd 4 . .Sh SYSCTL VARIABLES diff --git a/sys/conf/options b/sys/conf/options --- a/sys/conf/options +++ b/sys/conf/options @@ -807,6 +807,9 @@ KBDMUX_DFLT_KEYMAP opt_kbdmux.h +KBD_DELAY1 opt_kbd.h +KBD_DELAY2 opt_kbd.h + # options for the Atheros driver ATH_DEBUG opt_ath.h ATH_TXBUF opt_ath.h diff --git a/sys/dev/kbd/kbd.c b/sys/dev/kbd/kbd.c --- a/sys/dev/kbd/kbd.c +++ b/sys/dev/kbd/kbd.c @@ -143,8 +143,8 @@ kbd->kb_accentmap = NULL; kbd->kb_fkeytab = NULL; kbd->kb_fkeytab_size = 0; - kbd->kb_delay1 = KB_DELAY1; /* these values are advisory only */ - kbd->kb_delay2 = KB_DELAY2; + kbd->kb_delay1 = KBD_DELAY1; /* these values are advisory only */ + kbd->kb_delay2 = KBD_DELAY2; kbd->kb_count = 0L; bzero(kbd->kb_lastact, sizeof(kbd->kb_lastact)); } diff --git a/sys/dev/kbd/kbdreg.h b/sys/dev/kbd/kbdreg.h --- a/sys/dev/kbd/kbdreg.h +++ b/sys/dev/kbd/kbdreg.h @@ -151,8 +151,12 @@ void *kb_data; /* the driver's private data */ int kb_delay1; int kb_delay2; +#ifndef KBD_DELAY1 #define KBD_DELAY1 500 +#endif +#ifndef KBD_DELAY2 #define KBD_DELAY2 100 +#endif unsigned long kb_count; /* # of processed key strokes */ u_char kb_lastact[NUM_KEYS/2]; struct cdev *kb_dev;