Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: WinApi method for read key events buffer ?  (Read 3775 times)

0 Members and 1 Guest are viewing this topic.

Redee

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
WinApi method for read key events buffer ?
« on: May 14, 2015, 01:29:51 pm »
What winApi method Sfml using for read key events buffer ?
Now look into this functions > GetKeyboardState / GetKeyState / GetAsyncKeyState....
Someone knows ?))
« Last Edit: May 14, 2015, 01:33:33 pm by Redee »

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: WinApi method for read key events buffer ?
« Reply #1 on: May 14, 2015, 01:45:55 pm »

Redee

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Re: WinApi method for read key events buffer ?
« Reply #2 on: May 14, 2015, 03:32:00 pm »

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: WinApi method for read key events buffer ?
« Reply #3 on: May 14, 2015, 03:33:42 pm »
Then go dig up the event code.
You have the source, just look it up.

Redee

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Re: WinApi method for read key events buffer ?
« Reply #4 on: May 14, 2015, 03:40:05 pm »
We every frame call > wIn.pollEvent(eV)
But where accumulate events to Event object.....
No else functions calls to do check and approve event.

For example - if You click LMouse when your code will be change game world.
Your click accumulate to buffer.
But what it does I cant understand now.
If you know show me where this in winAPI.
Thanks in advance.

And for my research - event object read every event from winApi buffer.

Ok read next sources sfml.
Entry method is > void WindowImplWin32::processEvents

Then winAPI PeekMessage, TranslateMessage, DispatchMessage.
And no see where setted Event.
Only see after this setting MSG message object.

Damn its very tangled logic.
And no one answer me.

Anyways I'm closing research both Shifts triggered event issue.
Too tired )).
« Last Edit: May 14, 2015, 04:28:27 pm by Redee »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Laurent Gomila - SFML developer

Redee

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Re: WinApi method for read key events buffer ?
« Reply #6 on: May 14, 2015, 08:24:05 pm »
Thanks, its real answer )).
But no see where first call to processEvent(), only see to processEvents().

Need to debug on call stack.
« Last Edit: May 14, 2015, 08:31:36 pm by Redee »


Redee

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
Re: WinApi method for read key events buffer ?
« Reply #8 on: May 14, 2015, 08:53:49 pm »
Helpfully info!
Need to read msdn to understand more.
Troubles to detect work after DispatchMessage(&message);