kokoye2007 / waitzar

Automatically exported from code.google.com/p/waitzar
Other
0 stars 1 forks source link

Highlight virtual keys on the Help Keyboard when the mouse rests on them #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Split off from Issue 71; we should be able to do this easily.

Two problems:
  1) Pressing keys while moving the mouse, including holding down keys and other obnoxious behavior, will definitely mess up naive implementations. 
  2) Dragging other windows on top of each other will cause highlighting bugs. This is actually an issue now, but it is hard to detect with our small close/minmax buttons.

Two solutions:
  1) We need to refactor the keyboard slightly anyway, so let's make a general key "model", which includes its current "keyActive" state (pressed, released) and its current "MouseMove" state (over, not). We might even decide to just re-draw the help keyboard using MVC-style subscriptions.
  2) Statically track which window last contained the mouse, and broadcast an "un-highlight all" message when that value changes. Shouldn't be too difficult, given the way we've set up highlighting internally.

There will be one more remaining problem: that of moving the mouse outside the 
key window very quickly, or dragging onto another top-level, non-MyWin32 window 
(like a Dialog box). These glitches will be fixed as soon as the mouse 
re-enters the window. Fixing them at other times will require some clever 
API-digging ---Capturing the window won't do what we want, FYI.

Original issue reported on code.google.com by seth.h...@gmail.com on 20 Aug 2010 at 9:44

GoogleCodeExporter commented 9 years ago
Added virtual keyboard clicking; shift works too, yay! A few keys like "[" 
don't work at the moment; will need to add those later. I won't be adding 
Backspace, Enter, etc. for 1.8.

   2) Fixed.

   1) Will do when less tired. 

   3) Still no clue on this one.

Original comment by seth.h...@gmail.com on 21 Aug 2010 at 7:46

GoogleCodeExporter commented 9 years ago
1) Fixed.

Now time to figure out how to track the mouse leaving the window's client area.

Again, if we just Capture the mouse, then our multi-window system will break. 
(Consider multiple overlapping windows; capturing will definitely break down 
here).

Original comment by seth.h...@gmail.com on 22 Aug 2010 at 2:10

GoogleCodeExporter commented 9 years ago
TrackMouseEvent() might work:
http://msdn.microsoft.com/en-us/library/ms646265%28VS.85%29.aspx

Original comment by seth.h...@gmail.com on 22 Aug 2010 at 2:40

GoogleCodeExporter commented 9 years ago
Fixed!

All virtual key clicking works. 

Original comment by seth.h...@gmail.com on 22 Aug 2010 at 3:52