Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyUp when window deactivate #7

Open
CenturySpine opened this issue Sep 20, 2018 · 1 comment
Open

KeyUp when window deactivate #7

CenturySpine opened this issue Sep 20, 2018 · 1 comment

Comments

@CenturySpine
Copy link

Hello ! Great stuff here !

Just one remark : when you use the "KeyDown" function, that would be great to deactivate the keydown (by sending a keyup) when your application window deactivate, for exemple you get focus on another window in the application switch to another app and to propose to remember the state when the window activates back.

Right now, if you simulate a SHIFT key down, when you switch to another window, the shift is still in use and, for exemple, this will select text up to the carret if you switch to text editing like window or application

@TChatzigiannakis
Copy link
Owner

TChatzigiannakis commented Oct 10, 2018

Hi, apologies for the delayed response!

I get what you mean, but I have some reservations:

  1. Unless I'm misunderstanding your last paragraph, the current behavior that you're describing is what happens when you're holding down the physical SHIFT key. In that sense, the library is accurately simulating the behavior of the physical key, which I think is desirable.
  2. Changing the existing behavior (whatever that is) would potentially break client code, unless we are very careful to make the proposed change clearly opt-in.
  3. I feel that keeping track of the application's window state is out of the scope of this library and should be implemented by client code at a higher level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants