abetusk 3 days ago

I think your approach is pretty much fundamentally flawed.

Put it this way, let's say someone recorded typing in the paragraph that you presented but saved the keystrokes, pauses, etc. Now they replay it back, with all the pauses and keystrokes, maybe with the `xdotool` as above, how could you possibly know the difference?

Your method is playing a statistical game of key presses, pauses, etc. Anyone who understands your method will probably not only be able to create a distribution that matches what you expect but could, in theory, create something that looks completely inhuman but will sneak past your statistical tests.

cyode 3 days ago

Most text composition involves backspaces and cursor movement. This script simulated neither afaik, though I’m sure it could have without much more difficultly.

Probably you will need to track many signals like those and use a model that takes them all into account.

majorchord 2 days ago

Every OS has a similar facility for emulating keystrokes, and then there's the hardware solutions, e.g. raspberry pi that masquerades as a keyboard. It's practically impossible to prevent someone from cheating if they are motivated enough.