forum

Key presses per second program

posted
Total Posts
171
Topic Starter
Roan

Keys per second

Update note: You can now also track mouse buttons

So I wanted to know how many keys / second I pressed in osu! And I had already seen programs like this on streams.
I could however not find a program that worked on my computer so I decided to write one myself.

The program when active looks like this:



Accessible by right clicking on the program.

For each configured key it shows how many times it is pressed. By default it also shows the maximum, average and current number of keys pressed per second.
When enabled it can also show a graph of the number of keys pressed per second over time. The horizontal line in the graph represents the average number of keys pressed per second.

Everything shown in the picture above can be toggled on or off and all the panels can be arranged in a lot of different ways.

Lastly, there are also some commands that can be sent to the program:
Ctrl + P: Causes the program to reset the average and maximum value.
Ctrl + U: Terminates the program
Ctrl + I: Causes the program to reset the key press statistics.
Ctrl + Y: Shows / hides the GUI.
Ctrl + T: Pauses / resumes the counter.
Ctrl + R: Reloads the configuration file.

You can also move the program using the arrow keys this makes pixel perfect positioning possible :D .
Well I hope some of you find this program useful and/or will use it for your streams (I would love to see that happen :) ).
And if you find any bugs feel free to report them.

Notes

- To clarify, you can add any key, and any number of keys to the program. So it can be used for any game mode.
- The overlay option doesn't work on a Mac nor does it work when the fullscreen option in osu! is enabled.
- When changing the key order, the keys are ordered from lowest value to highest value (negative values & skipping indices is allowed).
- To change a GUI colour in the colours menu, click on the current colour.
- An opacity of 100% means completely opaque and an opacity of 0% means completely transparent.
- The snap to screen edge function works on multi-monitor setups.
- You can move the window with the arrow keys at 3 different speeds 1, 2 & 3 pixels at a time (2=Ctrl, 3=Shift).
- You can also track mouse buttons with this program.
- The order for positions is from the top left to the bottom right.
- You can pass the path to the config file to load via the commandline or a shortcut so you can skip the configuration step.
- For some people running the program in Windows 98 / ME compatibility mode makes it so it can overlay full screen osu! so if you're lucky this might work.

Updates

2 February 2017: Added the option for the program to overlay the osu! window. This only works if osu! isn't being run in fullscreen mode.
5 February 2017: Added support for a variable update rate & changed exit key to Ctrl + U (Ctrl + O opens the osu! options menu).
6 February 2017: Added the ability to configure the order in which the keys are displayed & some minor bug fixes.
9 February 2017: Invert the key text color when a key is pressed.
10 February 2017: Added the option to customize the GUI foreground & background colour.
12 February 2017: Added the option to track all keys, show tracked keys or not, fixed some edge case bugs & minor improvements.
12 February 2017: Added support for more then 10k hits on a single key (now displays correctly) & added the option to hide a tracked key.
12 February 2017: Added the option to remove added keys.
16 February 2017: Added support for decimal avg & cur, also added a new command key that hides the GUI.
17 February 2017: Added support for transparent colours.
17 February 2017: Added automatic version checking & removed the decimal point for cur since cur is an integer.
18 February 2017: Added support for a variable size & added an icon to the window.
21 March 2017: Major performance improvements & change opacity settings to use a percentage.
21 March 2017: Made adding keys a little bit easier.
24 March 2017: Added the option to pass a config file via the command line & minor bug fixes.
30 March 2017: Implemented a right click dialog, pause functionality & a snap to screen edge function.
31 March 2017: Fix ! path bug, add arrow key moving, improve window draging, properly reset the graph, fix no menu on graph.
1 April 2017: Implement 1 & 5ms update rate (CPU heavy), fix infinite instances bug, fix rendering bug, filter config selection view.
8 April 2017: Implement a text based config format & the option to configure the program while it's running & beter arrow moving support.
12 April 2017: Fix checkmark not being colored, fix custom colors being reset, implement config caps & defaults, fix size issue, add add key cancel button
13 April 2017: Add pause checkmark, fix overlay option, implement config reloading (ctrl + R), Fix visual glitch, fix trackall bugs, NPE workaround, fix double click = ctrl, improve command line arguments.
16 April 2017: Added the option to track mouse buttons, added the option to save the onscreen location of the program to the config.
17 April 2017: Rendering fixes & fix the counters being reset when the color is changed.
19 April 2017: Fix keys not being removed when they should be, fix Win 10 rendering bug, Add cancel option for graph, size, precision & update rate, fix move keys moving the context menu & program at the same time, fix loading a new config not resetting stats.
29 April 2017: Minor optimizations, context menu improvements & fixes, add totals panel, fix some bugs.
30 April 2017: Fix an opacity bug that causes the window to be invisible with certain settings.
28 May 2017: Fix a localization bug & add the option to track key-modifier combinations.
28 June 2017: Added a lot of layout options.
28 June 2017: Fix the position/index feature for keys not working.
28 June 2017: Add warning for invalid key/row/columns combinations, improve reset menu, add a value-text horizontal rendering mode.
16 August 2017: Fix several bug involving key-modifier combinations & a bug showing weird mouse button text.
9 November 2017: Implement save stats feature & 6 additional rendering modes. Fix key capacity checks, changing the update rate messing up the average, fix a multi-threading issue, fix a mode loading bug. Improve startup times & overall performance. Lots of internal refactoring & optimizations.
15 November 2017: Fix command keys with modefiers not working & visual enhancements for resetting.
24 December 2017: Fix all known key-modifier bugs, better support for unfilled grids, internal optimizations.
2 June 2018: Fix the arrow keys displaying rather broken.
3 June 2018: Switch to arrow symbols with better availability, fix configuration position saving and UTF-8 support, add GitHub link to the initialisation dialog.
12 September 2018: Completely new versatible layout system, rendering modes on a per key basis, improved performance.
27 December 2018: Variable layout size, variable layout border offset size, support for the right shift key, several other bug fixes, improved dialogs.
5 February 2019: Changable key name, periodic stats saving, separate track all options for keys and mouse buttons, some bug fixes.
27 August 2020: Windows style file chooser, prevent loading non-existent config files, force quoting for cli config passing, fix background transparency not being applied to non-panel areas, general aesthetic and internal improvements.
24 May 2021: sub-pixel rendering, save/load statistics on exit/launch, jnativehook update, Java 16 compatibility fix, fix incorrect fill color border offset, prevent ESC from closing dialogs, enable the config save button by default.

Todo list / working on

Working on more cosmetic aswell as functional ideas.

Downloads

(Java 8 required, supported operating systems: Mac (tested 10.11.6), Linux (tested Ubuntu 16.04 LTS) & Windows (tested 7, 8 & 10))
Windows executable
Runnable Java Archive

All releases: link
GitHub repository: KeysPerSecond
swem8
Thanks man looking these from everywhere now you made a one thank you you are awesome but how do i apply it to see it on osu?
KevinWalker
Whoa, nice job man. but, can this program used at mania?
Topic Starter
Roan

swem8 wrote:

Thanks man looking these from everywhere now you made a one thank you you are awesome but how do i apply it to see it on osu?
Idealy you would have a second screen to put it on or check it ocassionally. However I might be able to make it so that it is rendered on top of osu! so I'll experiment with that. It might not work though if osu! forces itself to be the top window. In that case you'd have to disable full screen mode. I'll get back to you once I've figured something out.


SDVX KevinKun wrote:

Whoa, nice job man. but, can this program used at mania?
You can add any key, and any number of keys to the program. So yes it can be used for mania ^^

Edit
I've updated the program and added the option to overlay the osu! window. This will however only work if osu! isn't being run in fullscreen mode (filling the entire screen is fine but the fullscreen option has to be off). Therefore this isn't an ideal solution, there is however no real solution because when I force my program to be the top window when osu! is running in fullscreen mode, osu! minimizes. If someone has a beter idea I'd love to hear it though.
Mustaucheman
Amazing job here, is there any way to make the graph/cur update faster?
Topic Starter
Roan

Mustaucheman wrote:

Amazing job here, is there any way to make the graph/cur update faster?
Yes that would be possible. I'll try to implement a variable update rate as soon as possible. :)

Edit
Implemented, CPU usage still seems to be reasonable even with relatively high settings I wouldn't go to crazy though xD. I do agree however that the program looks a lot smoother and active like this. There is now a button on the config screen that can be used to change the update rate to a value between 1000ms and 10ms. I also changed the 'terminate program' key to Ctrl + U since I forgot that Ctrl + O opens the options menu in osu! so I'd ocasionally terminate the program by accident.

Love these ideas :) please don't hesitate to suggest more features ;)
Agrrox
is there way to rearrange key order ?

edit: it seems to launch on mac, will test if it works with wine version of osu, overlay doesnt work for mac.
Topic Starter
Roan

Agrrox wrote:

is there way to rearrange key order ?

edit: it seems to launch on mac, will test if it works with wine version of osu, overlay doesnt work for mac.
There is currently no way to change the key order. I'll implement it as soon as I have some time. Also thank you for testing the program on a mac :)

Edit
Implemented! :) You can now change the position of the keys in the 'add key' window. The keys are then ordered from lowest value to highest value (negative values & skipping indices is allowed).
This information is ofcourse also saved if you save your settings. The only disadvantage of this is that configuration files generated with older versions of the program can no longer be read >.< I'm sorry :( .
Agrrox
Also to the interface... i think it will be better to invert the color of background and key, so its always visible when pressed. nice program :D
Topic Starter
Roan

Agrrox wrote:

Also to the interface... i think it will be better to invert the color of background and key, so its always visible when pressed. nice program :D
Thank you :) , do you mean that when a key is pressed I should change the text color to black? If so I'll implement that as soon as I have some time, since that seems like a useful feature ;) .

Edit
Implemented! The color of the text now turns black when the key is pressed, this way the text on a key is always clearly readable :) . And thanks again for your feedback ;) .
NightNarumi
Woah, this seems really interesting, gonna try this out tomorrow :p
Topic Starter
Roan

NightNarumi wrote:

Woah, this seems really interesting, gonna try this out tomorrow :p
Thanks :)
Agrrox
looks much better to me :)

can you implement ability to change colour? that would be cool to be able to change this.
Topic Starter
Roan

Agrrox wrote:

looks much better to me :)

can you implement ability to change colour? that would be cool to be able to change this.
:)
Sure I'll implement an option to change the colour as soons as possible (probably later today within ~6 hours).

Edit
Implemented! You can now change the GUI colours in the new colours menu. Both the foreground and the background colours can be changed, don't go too crazy because some colours are just not meant to be used together xD. Also this update shouldn't break previously saved configurations :) .

Edit 2
I thought of some extra features myself so I updated and added those in. You can now track all the keys on you keysboard without having to add all of them (they are not added to the graphical display though since it probably wouldn't fit on your screen, you can still add the keys you want to have displayed, but all of them will be tracked). And I added the option to hide the tracked keys so now it's possible to show just the avg, max, or cur or any combination of them. And it's now also possible to show only the graph. And there are also some optimization & fixes, but you're probably not interested in that anyway. :)

Edit 3
Whilst watching a stream I saw that the total number of hits wasn't being displayed correctly when it reached over 10k. So I fixed that. And while at it I also added support for hiding individual tracked keys. So now you can have keys counting towards your stats whilst they are not being displayed. :)

Edit 4
On request I added the option to remove added keys. Useful if you added a wrong key :) .
Mizyx
I think it would be great if you added opacity :D, cause some users could play better with it on :)

Edit:
Also resizable will be great too :oops:
iloveyou4ever
This is a very nice program :D
But can you add the function to show the 1 demical digits for the key per seconds?
I think it would be better :D
Thanks
Worst Mouse Aim
You can get that by external programs... I guess the reason is streaming?
Topic Starter
Roan

Mizyx wrote:

I think it would be great if you added opacity :D, cause some users could play better with it on :)
Sounds like a very nice feature :D . However it's not all that easy to implement :o . I put it on my todo list but I have no idea how long it will take me :/

iloveyou4ever wrote:

This is a very nice program :D
But can you add the function to show the 1 demical digits for the key per seconds?
I think it would be better :D
Thanks
Thanks and I'll implement that asap :)

Worst Mouse Aim wrote:

You can get that by external programs... I guess the reason is streaming?
Not exactly sure what you mean. But the reason I made this is because it's 'live'.

Edit
Added the option to display decimal avg & cur values. Also added a command key to show / hide the GUI (Ctrl + Y). :)
Still working on the other features. ;)

Edit 2

Mizyx wrote:

Edit:
Also resizable will be great too :oops:
:) yeah I think that would be great too. It's not really an easy thing to implement though xD. But I've put it on todo. I'll have most likely have both of your features finished by the end of the weekend :D.

Edit 3

Mizyx wrote:

I think it would be great if you added opacity :D, cause some users could play better with it on :)
Implemented! :) . In the colours menu you can now change the opacity of the foreground colour and the background colour ;) .

Edit 4
Implemented a little feature that allows the program to check for the latest version. So you no longer have to check this thread for updates :) (was there even someone who was doing that xD).

Edit 5

Mizyx wrote:

Edit:
Also resizable will be great too :oops:
Implemented :) , although I have to say that the program doesn't look as good in some sizes as it does in the default size. Especially upscaling makes some pixels more noticable :o . Might try to improve upon that in the future. :D
Zard0Z
This looks good. :3
Topic Starter
Roan

Zard0Z wrote:

This looks good. :3
Thanks :3
show more
Please sign in to reply.

New reply