Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Holding down a key still generates a lot of duplicated logs. #22

Closed
tlckfeks opened this issue Jul 17, 2022 · 15 comments
Closed

Holding down a key still generates a lot of duplicated logs. #22

tlckfeks opened this issue Jul 17, 2022 · 15 comments

Comments

@tlckfeks
Copy link

tlckfeks commented Jul 17, 2022

#15 issue has not been fixed yet.
Hold down a key still generates a lot of duplicated logs.

@suurjaak
Copy link
Owner

What happens if you close the program, set KeyboardJoinInterval to a higher value in the configuration file, e.g. to 0.5, and re-launch the program?

@tlckfeks
Copy link
Author

I tried changing "KeyboardJoinInterval" to some values.
Unfortunately I don't need KeyboardJoinInterval at all.
I often hold down one key for a long time.
Most keylog software recognizes holding a key down as a single press.
And whether I press a key 5 or 10 times per second, They accurately recognize and record it.
The log of InputScope is still confuses me. :(

@suurjaak
Copy link
Owner

I tried changing "KeyboardJoinInterval" to some values.

Unfortunately I don't need KeyboardJoinInterval at all.

I am rather confused about how these two sentences add up.

@tlckfeks
Copy link
Author

tlckfeks commented Jul 18, 2022

It means that I tried modifying the value of "KeyboardJoinInterval" to 1, 0.5, etc.
And that didn't help the Inputscope to accurately count the physical keystrokes.

@suurjaak
Copy link
Owner

Are you saying that modifying KeyboardJoinInterval had no effect whatsoever?

Are you sure modified the right configuration file, and that you do not have more than instance of InputScope running?

@tlckfeks
Copy link
Author

tlckfeks commented Jul 18, 2022

Let's take an example.
Suppose I set the value of KeyboardJoinInterval to '0.5' and I pressed R key 5 times for 1 second at a constant rate.
In this case, There are 1 log of the R key in Inputscope.db.
Did I press R key once? No, I pressed the R key 5 times.

And Suppose I set the value of KeyboardJoinInterval to '0.05' and I hold down R key for 5 seconds.
In this case, there are more than 10 logs of R key in Inputscope.db.
Did I press R key more than 10 times? No, I just pressed the R key once.

To be precise, Resetting the value of KeyboardJoinInterval had an effect on this issue.
But I think It just doesn't help the Inputscope to accurately count the physical keystrokes.

@suurjaak
Copy link
Owner

Okay, so the parameter works, just that the default value of 0.05 is not a good fit for your setup.

If you set it to 0.1, does it still count a long keypress as multiple events?

@tlckfeks
Copy link
Author

tlckfeks commented Jul 18, 2022

I set it to 0.1 and checked that it counts a long key press as two events or sometimes more than 3 events.
And if I quickly press a key repeatedly for some reason, Inputscope can ignore some events.
I've been testing keystrokes with InputScope, Mousotron and Keyplus.
I checked that InputScope might ignore some events.
I don't know much about programming, but I think InputScope is very inaccurate for counting keystrokes.
In contrast, KeyPlus and Mousotron accurately count keystrokes.

@suurjaak
Copy link
Owner

This is mostly a limitation of the underlying input listener library that InputScope uses. It does not provide information whether a key is physically depressed, it only provides keyboard events like typical programs receive. So the only way it can tell that a series of key events is a long keypress, is looking at the time intervals and using the KeyboardJoinInterval as a threshold.

A long keypress registering as two events is expected. When you press and hold a key like S, there is a delay between the first and second s produced, a delay that InputScope needs to count as two events - because it is indistinguishable from somebody typing really fast.

Out of interest - what are your keyboard settings for "repeat delay" and "repeat rate" options in Windows settings?

@tlckfeks
Copy link
Author

tlckfeks commented Jul 18, 2022

delay : short
rate : fast

Inputscope also counts keystrokes inaccurately by CPU usage.
I tested this on an older computer. The value of KeyboardJoinInterval is '0.1'
Depending on the CPU utilization, the result of counting keystrokes may always be different.
If CPU usage is high, Inputscope will count keystrokes more inaccurately.
In contrast, KeyPlus and Mousotron accurately count keystrokes.
https://player.vimeo.com/video/731268286

@suurjaak
Copy link
Owner

The short delay setting explains why 0.05 is too low for your setup.

CPU usage should not be a factor. Bear in mind that there is a delay of up to 5 seconds between an input event occurring and the input event being visible in statistics. InputScope does database writes in bursts, for lesser overhead.

@tlckfeks
Copy link
Author

tlckfeks commented Jul 22, 2022

What is the difference in the way KeyPlus, Whatpulse, Mousotron and Inputscope count keystrokes?
Unlike Inputscope, They do not require any configuration modifications by users.
Besides, They count physical keystrokes accurately.
As a result, I am using other software for counting keystrokes.
Inputscope seems very unstable at counting keystrokes.

@suurjaak
Copy link
Owner

Looking into things further, I see that I misspoke earlier - it is actually very possible for InputScope to detect whether a key is being held down physically.

If memory serves, I took the current approach because I wanted to count all the keys produced, not only whether a key had been depressed. I had quite forgotten about this.

I made a few changes, can try this version: https://erki.lap.ee/stuff/inputscope_1.7.dev1_x64.exe

It should be able to count long keypresses as a single event now. There is also an option in the tray menu for toggling this sticky mode off or on.

@tlckfeks
Copy link
Author

tlckfeks commented Jul 24, 2022

I have tried the dev version.
In fact, it seemed to have taken a considerable amount of time,
so I decided not to take any further interest in this issue.
But finally this issue has been fixed. I am glad that this issue has been resolved.

@suurjaak
Copy link
Owner

Released version 1.7 with sticky long keypress as the default setting.

Thank you for the thorough reporting.

@tlckfeks tlckfeks changed the title Holding down the keypress still generates a lot of duplicated logs. Holding down a key still generates a lot of duplicated logs. Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants