Im currently building a MUD telnet client in VB .NET and am having trouble
mapping functionality to certain keys.
the user is focused on a command textbox and can enter text and send it etc
etc but i also want the arrow keys and the numberpad to have special
functions.
now generally i like the keydown event because it has access to e.keycode
which will give me easy acces to capture any key on the board. keycode also
differentiates the number keys fromt he numberpad keys. *however* the textbox
has built in funtionality for the keypressed event so when i press say
numpad8 it does what i told it to in the keydown event then it typed "8" into
the textbox. and for some reason i cant fathom keypressed reveals only
e.keychar and cannot access keycode otherwise id write my if block into the
keypressed event and place the e.handled at the end.
so to the point . is there away to pass the e.handled to the keypressed
event so it knows i dont need it for that key. or is there a way for the
keypressed event to differentiate the numpad keys from the number keys so i
can override its normal functinality or handle my actions through the pressed
event instead?
|