Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


How to detect keypress instantly using API with C++?


How to detect keypress instantly using API with C++?

Author
Message
kazamamakoto
kazamamakoto
Forum God
Forum God (7.7K reputation)Forum God (7.7K reputation)Forum God (7.7K reputation)Forum God (7.7K reputation)Forum God (7.7K reputation)Forum God (7.7K reputation)Forum God (7.7K reputation)Forum God (7.7K reputation)Forum God (7.7K reputation)

Group: Forum Members
Posts: 41, Visits: 43
Yo all. Trying to detect KeyPress instantly using the GetAsyncKeyState API for C++ but im only able to get certain keys (with the MSDN tutorial at least). Should I use another API or is GetAsyncKeyState capable of detecting all keys being pressed? Thanks

"Hard work can eventually surpass genius"
Anasazi
Anasazi
Forum God
Forum God (31K reputation)Forum God (31K reputation)Forum God (31K reputation)Forum God (31K reputation)Forum God (31K reputation)Forum God (31K reputation)Forum God (31K reputation)Forum God (31K reputation)Forum God (31K reputation)

Group: Forum Members
Posts: 144, Visits: 536
Trying to write a keylogger are we? ;-]

Anyway though, yes. Using getasynckeystate is a good way but not the best.

You will find it quite annoying to use GetAs... for logging keystrokes, since it requires a hughe(or small) switch statement and a sleep command in order to avoid 100% cpu usage which will fail on loggin every keystroke if the user is a really fast typer.

I would recommend a keyboard hook though, but if you feel you deserve an example I can write a GetAsync... for you.

Time is an illusion perpetuated by the manufacturers of space.

Anasazi @ RESiSTANCE


GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search