Re: [AD] Windows keyboard state bug in 5.0.2.1 when switching display?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 30.05.2011 22:48, torhu wrote:
On 29.05.2011 01:13, Omar Cornut wrote:
  i process  WM_KEYUP.
  the  wParam  value  is   44  (which i presume is  VK_SNAPSHOT)

  os: win7

  i'm using a slightly modified allegro   4.3.10
  (modified to allow me access to the message pump pre- allegro processing
  it).

 Yes it is working with Allegro 4 branch but not Allegro 5.

 I have solved my keyboard issues on application side by:
 - Maintaining the key state buffer from Allegro events.
 - Clearing the key state buffer when destroying a display.
 - Overwriting the PrintScreen value of my local state manually:

      keystate[ALLEGRO_KEY_PRINTSCREEN] = GetAsyncKeyState(VK_SNAPSHOT) != 0;

 Which of course is only valid for Win32 build.

 As such, I am not in need of a change in Allegro but I think it would be
 worth updating the documentation to state about those two (minor)
 shortcomings.? Or at least this thread shall serve as a reference if
 someone has to Google up the same information :)

You should get a key up (but no key down) event for printscreen.  But I
think I've messed that up when I fixed another bug.  Sorry about that.

Nevermind, just me getting confused. Printscreen works, but Windows doesn't send key down events for printscreen, just key up. Kind of weird, maybe the docs should mention it.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/