473,386 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Capturing numberpad keys

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?
Jul 21 '05 #1
0 1356

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: veena | last post by:
hello, i have got a problem of how to capture two keys when pressed together i.e in my task i require certain action to be performed when the ctrl and 'A' keys are pressed together i.e i need to...
2
by: Phil Galey | last post by:
I'm using the ProcessCmdKey event to capture various keys that are pressed. However, I'm having trouble capturing the combination of the CTRL key and, say, the DOWN key. If I just press the CTRL...
0
by: SpinningCone | last post by:
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...
1
by: sULs | last post by:
Hi all Hoping someone can help !! I am trying to catch F2 - 6 key presses in a winforms application Code as follows private void frmMain_KeyPress(object sender,...
2
by: Sagaert Johan | last post by:
Hi I have a usercontrol , the keypress and keyup/down events do not seem to work on the cursor keys . How can i capture the cursor keys when my control has the focus ? Johan
3
by: MLM450 | last post by:
I have a control that handles the KeyDown event but it does not seem to execute when a combination of keys is pressed - like CTRL+Z. If I press CTRL, it executes. If I press Z, it executes. But the...
2
by: senfo | last post by:
Hello all, To help alleviate human error, I'm developing an application that uses a barcode reader to fill in a value in a TextBox control. The barcode reader is connected to the PC through the...
2
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
I have a tabcontrol where I want to capture the CTRL+C key combination. My tabcontrol has on its tabpages some treeView controls. My intention is to intercept the event of pressing the CTRL+C when...
2
by: John | last post by:
Hi How can I capture control keys Ctrl-A, Ctrl-B, Ctrl-C etc. in a form? Thanks Regards
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.