Re: Problem with using ALT keys and/or CTRL keys with wxEuphoria
- Posted by euphoric (admin) Apr 27, 2019
- 1663 views
Do you have those functions in your key event procedure?
This is taken from the catch_keys.exw demo:
procedure onKey( atom this, atom event_type, atom id, atom event ) integer keyIs, controlDown object junk keyIs = get_key_code( event ) -- I added this line to the demo ?key_event_altdown(event) --<-- THIS WORKS FINE (prints 1 when I have altKey pressed, 0 when not) if keyIs != 27 then if keyIs = 13 then msg[$] = msg[$][1..$-1] msg = append(msg,"_") elsif keyIs = 8 then -- deleting if length(msg[$]) > 1 then msg[$] = msg[$][1..$-2] & "_" else if length(msg) > 1 then msg = msg[1..$-1] msg[$] &= "_" end if end if else msg[$] = msg[$][1..$-1] & keyIs & "_" end if refresh_window( this ) else destroy( typeFrame ) end if end procedure set_event_handler( typeWin, -1, wxEVT_CHAR, routine_id("onKey"))