Hi

The first section on that page is almost the same as the approach taken 
in these patches. Why are we not doing it that way already? Why 
shouldn't we do it that way? Do you see any alternative if we want to 
handle Alt+Tab?

For our purpose we shouldn't care about mapping raw keyboard input to 
characters. We just need a scancode we can send to the remote side. Was 
there a particular reason you mentioned it?

I used GetAsyncKeyState on purpose. The low level hook is not tied to 
one window and how far it has gotten with the processing of events. The 
hook is global, just like the physical keyboard is global, and we thus 
have to stay aware when our window has focus and we thus want to 
intercept everyting and when we shouldn't care. AFAICS GetAsyncKeyState 
works on almost the same level as the hook. If GetKeyState was used 
instead we would look at a modifier state that no longer applies to the 
keypress we are processing. So in principle it seems wrong to use 
GetKeyState, and when I tried it I had problems with stale modifier 
states. I saw that a plain Enter long time after a Ctrl+Alt+Enter was 
interpreted as another Ctrl+Alt+Enter.

Can you demonstrate and explain why something else than GetAsyncKeyState 
would be better?

/Mads



Marc-André Moreau wrote, On 03/16/2011 12:41 AM:
> Hi Mads,
>
> In another life, I wrote this: 
> http://www.docdroppers.org/wiki/index.php?title=Writing_Keyloggers
> It explains in depth the two main methods for intercepting keyboard 
> input on Windows, and how to map raw keyboard input to characters.
>
> I see you're using GetAsyncKeyState(). I see a problem with that: that 
> method will get the key state for any window, not just wfreerdp.
>
> On Tue, Mar 15, 2011 at 5:59 PM, Mads Kiilerich <m...@kiilerich.com 
> <mailto:m...@kiilerich.com>> wrote:
>
>     Hi
>
>     Who knows anything about wfreerdp keyboard handling?
>
>     I would like to do it this way - do you have any comments?
>
>     /Mads
>
>     
> ------------------------------------------------------------------------------
>     Colocation vs. Managed Hosting
>     A question and answer guide to determining the best fit
>     for your organization - today and in the future.
>     http://p.sf.net/sfu/internap-sfd2d
>     _______________________________________________
>     Freerdp-devel mailing list
>     Freerdp-devel@lists.sourceforge.net
>     <mailto:Freerdp-devel@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/freerdp-devel
>
>



------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Freerdp-devel mailing list
Freerdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to