MSW ALT key event

Jean-Michel Fauth wrote:

Some random comments:
- event.Skip() in all handlers !
- assume text control has focus
- the text control is in a separate class
- text control is on a panel
- the returned key code in a Down/Up event, is not the same as in a Char
event. In Down/Up, code is the "real key" code. In Char event, code is the
ANSI code of the pressed char.

SUCCESS!
I paid special attention to your 'random comments'.

I created the wxTextCtrl as a separate class (was not rich) and set the EVTs
in that class. I threw in a wxWANTS_CHARS for good measure.

With your help I found that The ALT key is present in the KeyDown/Up but never
made it to the Char event.

So... in KeyDown, if ALT is present with another key, I _pass_ (force) the
event to the OnChar routine. Otherwise it wouldn't make it on its own.

My only problem left is MSW triggers the menu on an ALT press. If no menu is
present with the ALT combination I pressed, it just BEEPS.. only now, if it
is one of my speed keys, the correct phrase appears in the text box <grin>

I tried removing the ampersand (&) but I found out that is just a visual
queue. It still drops down by the first letter. For a quick fix I put a dot
(.) before the top level menu items. ALT key combinations don't drop down
the menu anymore but I get a BEEP on every combination. I hope that is not a
show-stopper with the users... but it may be.

<opinion>
Despite the little gliches with MSW, I still like wxPython very much. I just
wish all my user were on Linux, but until they do, great tools like wxPython
makes it easy. Someone once wrote GUI programming sucks... but
wxPython/wxWindows makes it suck a lot less ! A hearty 'thank you' for Robin
Dunn and all others involved... not to mention Jean-Michel Fauth and others
on this board.
</opinion>

Michael