considering modifier keys after gaining focus

Oliver Schmidt oschmidt-mailinglists@gmx.de
Tue Jan 10 09:47:00 GMT 2012


Hi,

On 1/9/2012 7:11 PM, Oliver Schmidt wrote:
> NEdit, press Ctrl+N for a new window, hold the Ctrl key and press S
> (i.e. Ctrl+S) for saving.

For the above NEdit example you have to disable the entry "Preferences /
Default Settings / Tabbed Editing / Open File In New Tab" from NEdit's
menu bar. Otherwise Ctrl+N will not open a new window.

Of course every keyboard driven program that opens new windows with
keyboard shortcuts will have problems with lost modifier key state.
Moreover, if using my patch for "programmatically raising top level
windows" ( http://cygwin.com/ml/cygwin-xfree/2011-08/msg00034.html ) the
problem also occurs if a application raises windows by keyboard shortcuts.

> I will try using GetKeyState tomorrow. I just wanted to be sure to get
> the current key state when the window gets the focus.

Ok, I tried using "GetKeyState" instead of "GetAsyncKeyState" and it
also works. So it seems to be a good idea to switch to "GetKeyState".

Best regards,
Oliver

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/



More information about the Cygwin-xfree mailing list