Author Topic: FilterKeys Setter... for a faster key repeat (in Windows)  (Read 29528 times)

0 Members and 1 Guest are viewing this topic.

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
FilterKeys Setter... for a faster key repeat (in Windows)
« on: Sun, 31 March 2013, 19:07:55 »
This is just a quick and dirty utility for making FilterKeys settings, which allows values that are not possible to set using the standard Windows UI.

It's main use would be, as the title says, to set faster repeat than is normally possible. The easiest way to use it for that purpose is to click 'Keyboard', which sets all the values to the same as you've got set in the normal Keyboard settings dialog in Control Panel, and then change repeat delay and rate to your liking.

If you want to make settings permanent, check the box 'Save to registry'.

No rebooting, or logging off and then on again, is required.



Source code is provided, in C++ for VS2003, which should be easy to convert to a later version of VS.

Essentially it's just a wrapper for calling the SystemParametersInfo function with SPI_SETFILTERKEYS and passing it a FILTERKEYS structure.

Related: How can I increase the key repeat rate beyond the OS's limit?, where there's some discussion and also source code for a command line utility that sets repeat rate and delay using FilterKeys.

v1.0.1
- added an 'Apply' button.

v1.0.2
- added a Test area.
- added 'Original' button, which loads settings active when the utility was launched, as a half-assed 'Undo' feature.
- replaced MFC icon with an equally crappy one!
- added some parameter validation.
- fixed bug where dialog closed when clicking OK even when setting failed.
« Last Edit: Mon, 01 April 2013, 14:36:14 by Soarer »

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #1 on: Sun, 31 March 2013, 22:34:10 »
Added an 'Apply' button :)

Offline fr4nk1sh

  • Posts: 9
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #2 on: Mon, 01 April 2013, 08:43:43 »
I'm alittle confused, what do all these settings apply to, only Filter keys?
Or is it possible to set any rate to my liking without going trought filter keys? :D..

Sorry for poor English hope you understand!

/Frank

Offline esoomenona

  • Gnillort?
  • Posts: 5312
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #3 on: Mon, 01 April 2013, 09:15:03 »
Is this like creating Turbo buttons for a keyboard!? :D

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #4 on: Mon, 01 April 2013, 09:31:53 »
I'm alittle confused, what do all these settings apply to, only Filter keys?

Yes, only FilterKeys. The utility has all of the possible FilterKeys options, even though we would typically only use a few of them, just for completeness.

Or is it possible to set any rate to my liking without going trought filter keys? :D..

Why not FilterKeys? It seems to work pretty well, and with this utility different settings can be made easily without having to log off each time.

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #5 on: Mon, 01 April 2013, 09:34:53 »
Is this like creating Turbo buttons for a keyboard!? :D

Yes! The trick isn't new, but this saves having to edit the registry directly :D

Offline esoomenona

  • Gnillort?
  • Posts: 5312
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #6 on: Mon, 01 April 2013, 09:37:56 »
Well that's a nice little utility, as usual, Soarer. I may never use it, but I appreciate that you spent the time to make it. Good job.

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #7 on: Mon, 01 April 2013, 09:53:12 »
Well I like fast keys! But I didn't know about this method until fr4nk1sh mentioned it - I'd always just used various add-ons that only worked in certain programs. Still not sure which I like better, but it's certainly less jarring to have the same settings in all programs.

Offline fr4nk1sh

  • Posts: 9
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #8 on: Mon, 01 April 2013, 10:10:39 »
Its like magic! :)!

I'm trying it out atm, very simple and nice.
Just edit the settings this way I realize how much of a struggle it was going to regedit every time before -.-

Thanks !!

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #9 on: Mon, 01 April 2013, 14:34:51 »
Added a Test area for v1.0.2 :D

Think I'm done with tweaking this now, so unless any bugs are found... enjoy!

Offline fr4nk1sh

  • Posts: 9
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #10 on: Mon, 01 April 2013, 17:00:19 »
Hiho I got a question

As far as I know Filter-keys can only be active if FlagS are set to either 58 or 59 is this correct,
and unless these Flags are set will those repeat/delays have any affect?.

Perhaps you could make a small guide :D

/Frank

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #11 on: Mon, 01 April 2013, 17:32:55 »
FilterKeys is active when the 'On' flag is checked ;)

That corresponds to any odd number for the combined flags value.

I don't know all of the details to give a guide! I simply put all the options there were into the utility. I haven't worked out exactly what 'Available' does yet, for example. Most of the other flags appear in the standard Windows UI for FilterKeys, but aren't really much use to us... 59 seems as good a choice as any for 'On', and 58 for 'Off' :)

Offline F u r u y

  • Posts: 427
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #12 on: Thu, 04 April 2013, 05:37:24 »
Well that's a nice little utility, as usual, Soarer. I may never use it, but I appreciate that you spent the time to make it. Good job.
Same! Thanks for taking your time and effort Soarer.
Filco 91 | Filco 87* | Filco 105 | PLU 87 | PLU 87 | Cherry 120 | Cherry 120
*

Offline HOKi

  • Posts: 2
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #13 on: Fri, 05 April 2013, 07:36:20 »
hi
bug report
Since I use this tool to edit my keyboard delay, and I saved it to the registry, i get a bug.
-it's quite rare and  noticed it while playing, so at some point it happens...
-not easy to describe: in starcraft 2 it disables me to unselect anything and instead everything I click will be added to the hotkeyGroup. Adding something to a group usually happens with holding shift key down. It also writes me capital letters. (I can describe more attributes if wished)
-bug is gone after alt tabbing

How can I remove this bug?
Hopefully it helps, and thanks in advance  :-*
« Last Edit: Fri, 05 April 2013, 08:03:11 by HOKi »

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #14 on: Fri, 05 April 2013, 08:31:02 »
I'm afraid there won't be anything I can do in this tool to help, since it just sets up FilterKeys :(

It's unlikely to be a bug in FilterKeys either - even with non-standard values, since people have been using them for quite a while by editing the registry directly.

So my guess is that Starcraft 2 doesn't like FilterKeys being active (or that it's something unrelated, and just coincidence). Does double-tapping shift get that locking mode as well perhaps? I found a post where someone used double-tap shift to clear a stuck shift. If that's a game feature, perhaps you can change the time it uses for detecting the double-tap in a config file to be less than your repeat delay.

Offline HOKi

  • Posts: 2
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #15 on: Tue, 09 April 2013, 11:20:56 »
hi,
first of all thanks for replying.

It looks like i have found the issue, under windows - center for easy control - keyboard - activate key delay  ( ), there was an (x), after putting it to ( ), it seems to work without errors although I didn't have that much time to test it yet. So I can use your filter keys without the bug now.

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #16 on: Tue, 09 April 2013, 14:21:21 »
Great! Let's hope that's the problem - it sounds logical; multiple things trying to set delays in different ways could well cause problems!

Offline Etran

  • Posts: 5
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #17 on: Wed, 10 April 2013, 14:25:40 »
Hello! First of all i want to say: great work with the software Soarer!

I found this thread trough a helpful individual at overclock.net that told me about it. I have been looking for ways to tamper with my repeat delay and repeat rate lately. I tried the software "Keyboard King" earlier but the program i have in mind, SC2, does not work too well with Keyboard king. After changing repeat delay and repeat rate trough this software on average 1 out of 3 or 4 clicks would be a failed one in SC2, but there would never be any failed ones outside of SC2. The failed clicks would not have the changed repeat delay and rate values but would have the windows control panel values. Such inconsistency obviously just makes things worse so i simply couldnt use Keyboard King for SC2. It should be mentioned that changing repeat delay and rate for SC2 is allowed, but obviously not too many people are using values outside of the windows control panel so its somewhat of an unexplored territory as of right now. The developers of Keyboard King has not updated the software for 9 years now but it seems to be the main software for its purpose even today. I have not found any other similar software.

After Keyboard king didnt work out i tried using windows filterkeys, but i found that SC2 did not like this either, every now and then while in a game the shift function would just go crazy. I just tried it again right now and it seems SC2 goes shift crazy randomly even if you dont press the shift key at all. Other strange selection bugs seems to occur as well.

I just tried your program Soarer and unfortunately i got the exact same behaviour in SC2 as i got from my experiences with windows FilterKeys (well, your program is FilterKeys simplified, so i guess i shouldnt be surprised, but i thought somehow maybe it would work and it was always worth a try). I read HOKis comment and i tried all kinds of settings in the windows control panel but i still get the same behaviour in SC2.

So if you (or anyone else reading this) can figure out a way to use filterkeys or any software providing a lower repeat delay than windows control panels lowest 250 ms combined with a decently high repeat rate in SC2, without SC2 being all buggy, then let me know! :p But im sure you didnt have SC2 in mind when you made your software so i understand if you dont want to spend time looking into the matter. After all, it could just be SC2 that is the issue and that right now there is no way to get a repeat delay and rate changing software to work correctly with it.
« Last Edit: Wed, 10 April 2013, 16:13:32 by Etran »

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #18 on: Wed, 10 April 2013, 16:48:03 »
Hmm, I'm seeing a pattern here with SC2 and crazy shift behaviours! Since I don't play it, I can't really help directly in solving these problems, but if I have any ideas on what might help I'll post them. I'm not sure what setting HOKi changed, or if it's a part of Windows. I'm pretty familiar with the different ways that games in general might read keys, but I just can't think what it is that SC2 might be doing that makes it incompatible with FilterKeys (which, after, all, is an OS feature so presumably less 'quirky' than 3rd-party utilities).

Offline F u r u y

  • Posts: 427
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #19 on: Thu, 11 April 2013, 00:22:45 »
Hi Soarer,

I suspect that SC2 has some kind of anti-macro protection even for OS configurations. I will explain.

I use non ANSI layout (pt-br ABNT2, set at Windows Control Panel) in an ANSI keyboard, so I press right Alt+W for the "?" character (in the picture you can see why). When I'm inside SC2 and in the menus (not playing a game), this works fine (Alt+W works). However, when I'm playing a game this does not work (Alt+W does not work).

The failed clicks would not have the changed repeat delay and rate values but would have the windows control panel values.
That's exactly what I expected. I think that SC2 tries to make the game the fairest possible using only standard OS configurations, which is a very nice feature imo.


Note: What I have just described is what happened in WoL (I'm months without playing). I went to test it right now and the game has completely changed (had to wait for gigabytes of updates!). It now has a completely new UI, features and system, HotS-like. And for my surprise, now I can use Alt+W inside the game. I think that the previous anti-macro system (or fair system, or equal condition sytem, or whatever you wanna call it :P) was even more hardcore than it currently is!
Filco 91 | Filco 87* | Filco 105 | PLU 87 | PLU 87 | Cherry 120 | Cherry 120
*

Offline Etran

  • Posts: 5
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #20 on: Thu, 11 April 2013, 06:16:19 »
Thanks for responding guys!

Based on what i know i doubt that SC2 has any anti repeat delay/rate changing or anti macro feature though. I know of certain casual players that use macros without any problems while playing SC2, a terran friend of mine has a macro for making a ton of marines by just one button click and he has used this for quite some time now. Macros are strictly forbidden in SC2 (stated very clearly by Blizzard) so a non casual SC2 player would never consider using a macro for anything in SC2, and that obv includes myself. And thus, we are obv never seeing a serious player showing up at a lan event with some macro functions to make use of, because that player would be disqualified in an instance. But based on what i know it seems macros work perfectly fine in SC2, and for casuals it seems to be more commonly used than one would think. Also i know that players have been able to play SC2 with a way higher repeat rate than the windows control panel max when using a keyboard with options for increased repeat rates, such as the Zowie Celeritas. But Keyboad King and FilterKeys (not macro software, just repeat delay/rate tweaking) as stated dont work well at all with SC2, while macro softwares seemingly work just fine. So i dont think the reason as for why Keyboard King and FilterKeys dont work too well with SC2 has to do with some purposely made anti repeat delay/rate tweaking or anti macro feature by Blizzard, but that it instead has do to with some programming conflict between the program and the software.

Obviously an increased repeat rate or a lowered repeat delay is not a macro by any means, but since it can give an edge it is reasonable to question whether it should be allowed or not. I came across a post in a blizzard forum asking about tweaking repeat rate/delay values beyond the windows control panel (http://us.battle.net/sc2/en/forum/topic/2794772806) but he got no response by Blizzard. Blizzard has stated very clearly that macros are not allowed, but on the matter of tweaking repeat delay/rate it seems they have been silent. But not too many people have been asking about it anyways.

In any case, i am still interested in getting FilterKeys or some other repeat delay/rate tweaking software to work for SC2 so if anyone here figures anything out let me know. What i would change is basically just lowering the repeat delay from 250 ms to about 120 ms (it cant be too low because that would make it so that i would double click control groups and other things by mistake). That would make it so that i would save significant time troughout a game when combining all the small moments where i save time. The repeat rate max in the control panel can stay the same as i dont find it as vital. But yea, lowering repeat delay also has its downsides, thats why one can select different levels of it in the control panel anyways.
« Last Edit: Thu, 11 April 2013, 07:01:23 by Etran »

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #21 on: Thu, 11 April 2013, 06:19:50 »
Ohhhh. Yeah, anit-macro makes a lot of sense. Although they could probably have done it better by implementing their own repeat from scratch!

F u r u y ... Your description of how it was (re. Alt-W), sounds like it was using Windows' key events in the menus, and DirectInput in the game... DirectInput doesn't have any key repeat functionality, so they'd have to write their own. With key events they still could do it, by tracking key state and ignoring repeated keys. Repeating keys from FilterKeys don't come through as event sequences of down-up-down-up-..., they are down-down-...-up (just like the normal repeat settings). Macros would be more likely to be down-up-down-up, and indeed have to be if they are done on a USB keyboard.

Of course, if a macro is timed to be within the limits set, it wouldn't be detected anyway....

Offline Isley

  • Posts: 1
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #22 on: Mon, 15 July 2013, 20:03:26 »
Hello, its possible to set the Filter only on determined keys? Like the keyboard king tool do?

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #23 on: Mon, 15 July 2013, 20:23:43 »
Welcome!

No, it always sets the same settings for all keys.

Offline MOZ

  • KING OF THE NEWBIES
  • * Maker
  • Posts: 3966
  • Location: Jo'burg
  • Busy making stuff
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #24 on: Mon, 15 July 2013, 21:10:28 »
Nifty little utility.

Shall download and test.

Offline Ceaseless

  • Posts: 2
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #25 on: Fri, 10 January 2014, 01:54:40 »
bug report:

I get another bug and it seems nobody else so far got that.
The Flag value is automatically set to 127 although i saved it with 126 every time i restart (or relog) my pc.
This is the case since i clicked apply after checking the save to registry box when using your program.

And when i manually change the flag value to 126 in the registry, it doesn't work because it is automatically set to 127 when restarting my pc. :(

Maybe i could fix it if i knew what this program exactly does?
Need help please  :'(
« Last Edit: Fri, 10 January 2014, 02:09:46 by Ceaseless »

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #26 on: Fri, 10 January 2014, 06:12:39 »
I dunno if it's a bug in the program, or a quirk in Windows. There's source code and a few links in the post which might help, but maybe the first thing to try is resetting the values. Either run FilterKeys Setter, click Default, Save to registry, Apply, or use the Accessibility Options Control Panel Applet to set something valid. Then see if the odd behaviour still happens when you edit the registry manually.

Offline Ceaseless

  • Posts: 2
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #27 on: Fri, 10 January 2014, 12:19:20 »
I have already tried those things. But without success.
I looked into the source code but i am not a programmer and don't understand it.

Luckily i have found a temporary solution. I erased the whole Accessibility folder in the registry. I will post how i did it just in case someone else encounters the same problem
1. Open registry editor
2. Goto HKEY_CURRENT_USER\Control Panel
3. Make a backup of folder Accessibility (in case you want to restore it. Save it where you want)
4. Erase Accessibility folder
5. ??
6. Profit!!

I think this works because whatever automatically changes my flag value every time i restart my pc, it can't do that when there is nothing that can be changed...

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #28 on: Fri, 10 January 2014, 13:44:34 »
Hmm, still doesn't answer why Windows kept turning it back on!

Most of the program is just dealing with the dialog controls etc., with all the actual work being done in a single call to a Windows function. So it's kinda difficult to see how this program could be causing the behaviour! :D

Offline Corak

  • Posts: 1
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #29 on: Tue, 29 April 2014, 17:43:20 »
Hi! Just found your program and tested it.
That's excellent solution for changing undocumented typematic values. Especially Delay/Rate. But there's some trouble using these feature. When filterKeys flag is ON - It would not filter if some application slows and key will simply stuck, so I have to Press it again to Unpress. So In normal mode - after some waiting when key is stuck - it will unpress it. In "flag" on - it will not...

By the way. I have a simple multimedia keyboard with feature to change typematic (7 modes. 4th - seems original mode.) 7th fastest - is like rate=10ms/delay=150ms. But the main reason it's best - it still uses stuck filter. So it will add KeyOff after some time of stucking...  Also it works from the very start of Bios, so even in other OS. I just want to find some program that can trackdown the values in memory that it changes and applies, and get it in your program.
my keyboard now is Turbo-Media KB9801R+.

Offline brubaker

  • Posts: 1
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #30 on: Tue, 21 October 2014, 15:15:34 »
Hi!
I asked myself if something like a left-click repeat function on the mouse is also possible with a similar Windows function? I would be very grateful for an answer to the mouse click topic.

Warm regards
brubaker

Offline Irex

  • Posts: 1
Re: FilterKeys Setter... for a faster key repeat (in Windows)
« Reply #31 on: Fri, 29 April 2016, 00:46:04 »
Does anyone know what the default Key Repeat settings are in Windows 7? I plan on setting it with FilterKeys, but if it proves problematic, is it possible to do it through Windows? An internet search proved fruitless. I have never experienced a problem with FilterKeys in the past but ever since messing with the settings on a recent install, it seems like my IBM Model M just isn't typing like it was prior to doing it; e.g. it seems shift and control keys sometimes are not triggered and if I am typing quickly, it's prone to mistakes. After some playing around it's almost back to normal but it isn't perfect. Not sure whether a Windows 7 update is to blame or, if it's something with how my MB inputs PS/2 signals, or if I am just losing my motor skills along with my sanity. I have yet to try it with my only USB keyboard (Matias Ergo Pro).

To the OPI would like to thank you personally for this program. I have been using it heavily since 2013I dare say that it has been one of, if not the greatest, productivity enhancer(s) that I've used. You see, I am a big fan of 'caret browsing', both for the web and PDFs, and if I want to read and something in detail, I will enable it and hold the right arrow key in and scroll; FilterKeys doubled the speed of this process. It may seem like a useless thing to do, but if you are reading dry textbooks on material that you could care less about, it really allows you to read at a consistent rate without the mind going astray. This program has saved me countless dozens of hours (prior, I would just read through as the repeat rate for any keyboard, even my Maltron, was just too slow) and I would even go as far as crediting it for helping me get through my last (nearly 3, now?) years of college. Again, thank you from the bottom of my heart for uploading it to this site, otherwise I would have never found it.