Re: wxEuphoria -- keys
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Feb 09, 2006
- 468 views
Jerry Story wrote: > > Gotta problem with keys: > <snipped> It only seems to work when I have the mouse over the window. I tested this using coLinux and a Cygwin X-server, so I suspect that it has the focus follows mouse setting on. If you're not going to process the key-up event, you need to add a skip(event) in there.
procedure onKey(atom this,atom event_type,atom id,atom event) if key_event_controldown(event) then key = get_key_code(event) key = upper(key) if key = '1' then set_focus(btnButton1) debug("in Button1") elsif key = '2' then set_focus(btnButton2) debug("in Button2") elsif key = 'T' then set_focus(txtText) debug("in Text") elsif key = 'Q' then exit_main() else set_focus(Win) debug("Try 1 2 T Q") end if else skip(event) end if end procedure
Matt Lewis