Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Note that kbdrate only affects existing keyboards, and HP iLO attaches a new
- # USB keyboard when you connect, so you may have to reboot (with the iLO console
- # attached) to get the keyboard delay and repeat rate to take effect.
- [Unit]
- Description=Set longer delay time for key repeat
- [Service]
- Type=oneshot
- RemainAfterExit=yes
- StandardInput=tty
- StandardOutput=tty
- ExecStart=/sbin/kbdrate -d 1000 -r 2
- [Install]
- WantedBy=multi-user.target
- WantedBy=rescue.target
- From 78c32f539b89bf385985bea47a7058a540d31da0 Mon Sep 17 00:00:00 2001
- From: Ivan Kozik <ivan@ludios.org>
- Date: Thu, 30 Mar 2017 13:31:17 +0000
- Subject: [PATCH] Increase the default keyboard repeat delay from 250ms to
- 1000ms and repeat rate from 1000/33 Hz to 1000/500 Hz to avoid unintentional
- repeated keystrokes when using remote consoles such as HP iLO over
- high-latency links. These consoles (HP iLO included) often transmit key
- states (up/down) instead of keystrokes, making it impossible to even enter a
- password and log in.
- Fixing this in the kernel avoids problems with kbdrate where the parameters
- passed to kbdrate don't apply to the new keyboards attached by HP iLO.
- ---
- drivers/input/input.c | 2 +-
- drivers/input/keyboard/atkbd.c | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
- diff --git a/drivers/input/input.c b/drivers/input/input.c
- index 880605959aa6..a195af2d062a 100644
- --- a/drivers/input/input.c
- +++ b/drivers/input/input.c
- @@ -2126,7 +2126,7 @@ int input_register_device(struct input_dev *dev)
- * is handled by the driver itself and we don't do it in input.c.
- */
- if (!dev->rep[REP_DELAY] && !dev->rep[REP_PERIOD])
- - input_enable_softrepeat(dev, 250, 33);
- + input_enable_softrepeat(dev, 1000, 500);
- if (!dev->getkeycode)
- dev->getkeycode = input_default_getkeycode;
- diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
- index ec876b5b1382..9dd04c2215b3 100644
- --- a/drivers/input/keyboard/atkbd.c
- +++ b/drivers/input/keyboard/atkbd.c
- @@ -1096,8 +1096,8 @@ static void atkbd_set_device_attrs(struct atkbd *atkbd)
- BIT_MASK(LED_MUTE) | BIT_MASK(LED_MISC);
- if (!atkbd->softrepeat) {
- - input_dev->rep[REP_DELAY] = 250;
- - input_dev->rep[REP_PERIOD] = 33;
- + input_dev->rep[REP_DELAY] = 1000;
- + input_dev->rep[REP_PERIOD] = 500;
- }
- input_dev->mscbit[0] = atkbd->softraw ? BIT_MASK(MSC_SCAN) :
- --
- 2.11.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement