Click to See Complete Forum and Search --> : keyboard/ascii codes
joelc
08-14-2003, 05:38 PM
We have several wireless access points at work, and have been controlling acess to them based on MAC Address. I'm working on a program to automaticaly update the access control lists the access points use, and then push the list out to all of the access points. Maintaining the list is a no-brainer, but I'm having trouble with pushing the list out. The interface for the Access Points is standard telnet, and I have a component to handle most of that for me, but I have one problem: I can't send function keys. I need to know the commands/ascii codes for the F1, F3, and Down arrow keys. It's a stupid little thing, I know, but I can't find a reference for them anywhere.
Morphine Drip
08-14-2003, 06:01 PM
i found a link here...
http://www.mnpage.com/petsuch/ascii.htm
or more specifically...
http://www.mnpage.com/petsuch/images/a.gif
bwkaz
08-14-2003, 08:23 PM
They're not ASCII codes. ;)
Even the link(s) that Morphine Drip posted will only work on one combination of terminal emulation type and OS. If they work on Windows, they will not work in Linux.
First off, what terminal type does this telnet server support? What terminal type is your telnet client using? You might be able to figure this out with an echo $TERM from inside the telnet, but maybe not (it depends on your AP's OS / shell). If you can't find out from that, check the AP's manual.
Second, you'll have to find a reference for that terminal type. For example, the VT100 (a very common terminal type) has references for its various escape sequences listed all over the net...
joelc
08-15-2003, 11:03 AM
It's all menu driven, so I can't do the echo $Term thing. It's pretty much a standard terminal so, yeah, it's most likely a vt100. I don't know why I didn't think to check for that sooner. I'll post back if I still need help after checking that.
joelc
08-19-2003, 12:39 PM
Okay, still need a bit of help. I found the codes that the telnet program would send to the server, but as I said, I am using a component to handle most of that for me. What I really need to know is either the code the keyboard sends to the operating system or the code the operating system would give to the application, so I can fake a function call to my component. If it helps anyone I'm using Bordland Builder 5 (it's at, and I'm stuck on windows), and this is the last piece I need before having the thing ready for some serious testing.
[edit]
Oh, once again, the keys I really need are F1, F3, and the Down arrow.
Stuka
08-19-2003, 01:49 PM
One possible solution is just to print out the codes from your keyboard in a short test program. Then try those codes.