kernc / logkeys

:memo: :keyboard: A GNU/Linux keylogger that works!
Other
758 stars 253 forks source link

Feature Request - Remember Modifier state #232

Open mat-m opened 3 years ago

mat-m commented 3 years ago

Hello

If I type CHarge, I got in the log: <Enter><LShft>CHarge

I would like it to detect when Mod are pressed, e.g.: <Enter><LShft>C<LShft>Harge <Enter><LShft>CH</LShft>arge

Those will allow me to count the Mod usage also. It is easy on Shift, but less on Ctrl or Alt.

crides commented 1 year ago

So I did a very crude attempt at this, which from my current testing seems to work. It uses your idea of doing </mod> for the released modifier. The added code is pretty wet (you know, as opposed to DRY), but shouldn't incur much runtime cost?