Ver Mensaje Individual
  #13
Antiguo 5 de junio de 2016, 17:43
Eslopes
Creador de
PowerRustCOBOL
Guru de los Gurus: Por solidos y amplios conocimientos - Issue reason: Por ámplios conocimientos en la materia Concurso: Tercer puesto: Ganador/a del Tercer puesto en un concurso - Issue reason: Juego  Innovación: Por aportar innovaciones - Issue reason: Por aportar soluciones innovadoras 
Última Actividad 20.09.2026 13:24
Posts Posts: 357
Likes enviados Enviados: 29
Likes recibidos Recibidos: 157

Olá,

de acordo com o post do forum abaixo, nem sempre o Windows faz um scan das teclas, então GetKeyState força este scan.


Cita:
I'v been using GetAsyncKeyState quite extensively without any issues. But if you follow the news groups, you'll realize that GetKeyboardState does have a quirk which is really not identified in the MS docs. The quirk is that the message processing can go out of synch based on how the messages are processed. In other words, Windows can sometimes avoid updating the keystate buffer if for some unknown reason it feels that updating the buffer is not necessary at times. Thus, the key state buffer may not be up to date and in sych with the input message queue. The news group folks recommend calling GetKeyState prior to calling GetKeyboardState to eliminate this potential problem.

GetKeyboardState() problem


Saludos, Emerson
Eslopes is offline   Responder Con Cita