Windows 7 Keyboard Repeat Rate and Delay are Reset on Resume from Standby / Sleep

20

4

I always keep my keyboard repeat rate at the maximum and the delay at the minimum for optimal keyboard responsiveness.

Under Windows 7 however, I have found that the rate and delay are reset to the defaults (ie the one’s that are set with a fresh Windows installation) whenever the system resumes from sleep and requires opening the keyboard control panel applet (which already shows the desired settings) and manually setting them again by pressing Enter.

I have seen a couple of posts in the Microsoft support forums, but no solutions. Does anyone know of a way to fix this?

Synetech

Posted 2011-02-12T13:20:28.380

Reputation: 63 242

As you have not yet accepted an answer, have a look at my revised answer if you will. – Frank Conijn – 2018-04-11T11:16:02.957

It seems to be a power management issue. Do you use a notebook? – NGLN – 2011-12-20T18:03:05.207

@NGLN, no; desktop. – Synetech – 2011-12-20T19:56:49.793

Answers

10

I had the same problem. Very irritating. So I wrote a little task bar application that resets the keyboard repeat rate and delay when it's double-clicked. It's supposed to reset the rate and delay when it comes out of sleep but sometimes it works, sometimes it doesn't. But double-clicking the little task bar icon is so easy I haven't bothered debugging it that far.

Download the source here: http://thumpers-hole.net/KeyboardReset.zip
Download just the app here: http://thumpers-hole.net/KeyboardReset-JustExe.zip

Hope this helps.

EDIT: Fixed link. Sorry for the wrong link.

chris

Posted 2011-02-12T13:20:28.380

Reputation: 101

Thanks Chris, I uploaded your sources here: https://github.com/lallousx86/KeyboardSpeedReset/ . I plan to add some changes and keep it open source.

– Elias Bachaalany – 2014-07-28T11:30:37.243

Thanks for the work-around. I saw a similar solution presented in a Microsoft Answers thread—possibly from you. (I hope Maggie somehow gets better.) – Synetech – 2011-03-08T19:05:59.173

You're welcome. Like I said, I feel your pain on that one which I why I made the app. And thanks for your thoughts on Maggie. She was a wonderful woman but she's in a better place now. – chris – 2011-03-11T14:09:07.790

Oops, sorry; I didn’t notice that part.

We lost a cat (who was like a child) to lung cancer a couple of years ago. He was not feeling well, so we brought him to the vet to get better, and had to put him to sleep and go home without him. I’m not sure which is better, a long lead-in or sudden loss. – Synetech – 2011-03-11T19:27:08.980

6

The selected answer by chris did not work on my Win 8 64 bit install. This line can be run from a batch file to reset the rate.

mode con: rate=32 delay=1

I just run it from a shortcut.

Source: https://forums.lenovo.com/t5/IdeaPad-Y-U-V-Z-and-P-series/Re-Y50-Windows-8-Keyboard-response-too-slow-after-coming-back/m-p/1809426

Edit 1

The batch file can be added as a scheduled task to execute after the laptop wakes from sleep. It briefly pops up a command line window but it avoids having to worry about running it manually.

Set up the task with a custom trigger with this filter

<QueryList>
  <Query Id="0" Path="System">
    <Select Path="System">*[System[Provider[@Name='Microsoft-Windows-Power-Troubleshooter'] and (Level=4 or Level=0) and (EventID=1)]]</Select>
  </Query>
</QueryList>

Edit 2

The above is for Windows 8. To answer Frank's comment implementing for Windows 7. This might work but I don't have system to test with. I will edit and remove if it does not. Based on this answer https://superuser.com/a/84453/400252

Create a batch file (keyboard.bat) on your PC containing the mode command above.

Open Task scheduler. Right click Task Scheduler Library and select Create Task.

Name the task.

In Trigger tab click New. Begin the task: On an event. Log: Microsoft-Windows-Kernel-Power/Thermal-Operational. Source: Kernel-Power. Event ID 1.

In Actions tab click New. Action: Start a program. Browse to the batch file you created.

In Conditions tab uncheck Stop if the computer switches to battery power.

In Settings tab check Run task as soon as possible after a scheduled start is missed.

I'm not sure if you need to change the security options in the general tab regarding running when logged on or not, or running with highest privileges. I do not have a system to cannot test this with.

If the above does not work then as a work around create a shortcut to the batch file somewhere where you can quickly run it when required such as in the start menu or quicklaunch bar.

Goose

Posted 2011-02-12T13:20:28.380

Reputation: 161

1

I think the settings whould be: "mode con: rate=31 delay=0" http://www.computerhope.com/modehlp.htm

– Skorunka František – 2015-08-01T16:50:30.417

1You can simply type mode in the windows command prompt (cmd.exe) to display all your current connection setting values. – David C. Rankin – 2017-06-24T04:19:31.820

I'm very interested in your scheduled task, but I would need a step by step implementation guide. I only have general computer knowledge and only know HTML, CSS, JavaScript and PHP. – Frank Conijn – 2018-04-03T19:13:34.733

1I solved my repeat rate problem. After your edit of Apr 5 I still could not get the task to run automated. The problem was the Trigger. But I found that there was a Trigger option 'On workstation unlock' as well. Together with info from another site, that allowed me to cure the repeat rate problem and see why other suggestions had not worked (well) before. See my revised answer for the whole story. Thanks for pointing me in the right direction. – Frank Conijn – 2018-04-11T11:23:43.863

4

The command form Goose's answer works on my system, but I wasn't satisfied with running it each time manually. If you also wish to automate the process, follow these simple instructions:

  1. Download NirCmd
  2. Put nircmd.exe in your Windows folder
  3. Open Task Scheduler
  4. Create new task and name it as you wish
  5. Crete new trigger with these settings: (Begin the task: On an event, Log: System, Source: Power-Troubleshooter, Event ID: 1)
  6. Create new action with these settings: (Action: Start a program, Program/script: nircmd, Add arguments (optional): execmd mode con: rate=32 delay=1)
  7. In Conditions tab uncheck "Start the task only if the computer is on AC power)

Xtal10

Posted 2011-02-12T13:20:28.380

Reputation: 76

Goose's command works for me as well, be it that the max rate is 31 (on Win7 Pro at least). However, your NirCmd does not. It runs at log-on, as I can see in the Task Scheduler, so your installation guide is correct. But it does not change the repeat rate or the delay. I have them argument-wise set at 28/2, but after the Task Scheduler made NirCmd run, my machine stays set to 31/0. I hope you're still 'listening in' to this thread. – Frank Conijn – 2018-04-03T11:24:24.407

1

[EDIT: completely revised answer]

Some observations, two solutions and a warning regarding Registry changes. The observations will improve your understanding and are necessary for the differential diagnosis of your problem.

.

THE OBSERVATIONS

  1. The problem occurred/occurs in in principle all Win versions: XP, Vista, 7, 8 and 10. I read that here and on other forums.
  2. The problem occurs on laptops and desktops.
  3. The problem is reported to occur on Lenovo and Dell machines, although in many reports no brand is mentioned. (If your machine is a different brand, please leave a comment.)
  4. There is a difference between sleep (= standby) and hibernation. And you might have 'Hybrid sleep' on your machine. For the whole story, see https://www.howtogeek.com/102897/whats-the-difference-between-sleep-and-hibernate-in-windows/.
  5. There are 4 circumstances under which you have to enter your Windows password, each with their own indication above the password field:
    • After the screen was locked. Indication: 'Locked'.
    • After you rebooted. Indication: none.
    • After you logged off (which also means that all programs were closed). Indication: none.
    • After you switched users. Indication: in case of only one user: 'Logged on' (yes, 'on'); in case of multiple users, that may differ (I cannot test that).

See when exactly your problem occurs, by means of the indication. If you do not use a password: Control panel > Power options > Left pane: 'Require a password' > select 'Require a password'. The following solutions are for the case 'Locked', which I think is the vast majority of cases. If your case is different, please leave a comment.

.

THE SOLUTIONS

The two solutions are improvements of suggestions by others, here and elsewhere.

The first is a quick fix, for laptops: Control panel > Power options (or equivalent) > 'When I close the lid': Do nothing (2x). That might cure your problem, even though your laptop will not automatically wake up anymore after opening the lid.

The second is an advanced solution, for laptops and desktops: an automated cmd.exe (DOS) command that resets the character repeat rate (that's what it is called officially) to maximal, immediately after unlocking the system. Here is the How to:

A. Open Notepad and type mode con: rate=31 delay=0. Higher than 31 is no use, delay=0 is. Save it in a Windows system folder (e.g. C:\Windows), naming it something applicable, like CharRepeatReset.bat. The .bat is a must.

B. Double-click the file and see if it resets the repeat rate. If it does, you can automate that double-clicking as follows:

  • Start > Search > type: task > Task Scheduler.
  • Right pane: Create task. That opens a window with the tabs General, Triggers, Actions and Conditions.
  • General > Name: the name of your file without the .bat (e.g. CharRepeatReset). For now, leave all other settings on that tab as they are.
  • Triggers > New > On workstation unlock > Any user.
  • Actions > New > Start a program > Browse to your .bat file.
  • Conditions > De-tick 'Start the task only if the computer is on AC power'.
  • Click 'OK' (no need to change anything in Settings).

Let me know how it works, here or via f [dot] conijn [at] conijnconsultancy [dot] com.

.

WARNING REGARDING REGISTRY CHANGES

This concerns the changes made in HKEY_CURRENT_USER\Control Panel\Accessibility\Keyboard Response, that are suggested sometimes. I tried that in several ways and it might work, but in all cases it came with serious side effects. Ranging from the processor going into overdrive to complete freezes that could only be solved with power interruption. The latter makes you loose unsaved files. So be very careful with that.

Frank Conijn

Posted 2011-02-12T13:20:28.380

Reputation: 129

I have the same issue on Win8 and now on Win10. Lenovo Yoga 12. – Skorunka František – 2015-08-01T16:33:06.553

@SkorunkaFrantišek — See if the revised answer contains a cure for you. – Frank Conijn – 2018-04-11T13:09:34.300

0

go into:

  1. control panel
  2. ease of access center
  3. make keyboard easier to use
  4. setup filter keys
  5. setup repeat and slow keys

robert

Posted 2011-02-12T13:20:28.380

Reputation: 11

1Nice found, but it's not the wish to slow the keys down, but up. – NGLN – 2011-12-20T18:03:53.520

3@robert I already have them set to the maximum repeat rate and minimum delay. The problem is that the settings are lost when I resume from standby (as the question clearly states). – Synetech – 2011-12-20T19:58:28.667