Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: ASCII Code for Functions Keys (F1-F12) and TAB key

Thread Tools

Re: ASCII Code for Functions Keys (F1-F12) and TAB key

Posts: n/a


F1: 112

F2: 113

F3: 114

F4: 115

F5: 116

F6: 117

F7: 118

F8: 119

F9: 120

F10: 121

F11: 122

F12: 123

Standard ASCII mapping ...


Posted via
Reply With Quote
Mike Wahler
Posts: n/a
MadLucas <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Here:

Please don't post off-topic material here.

What you've written is wrong anyway. ASCII
(a standardized character set) has no characters
called 'F1', 'F2', etc.

> F1: 112

The values 112 through 122 are the ASCII encodings for the
lowercase characters 'p' through 'z'; 123 is the ASCII
encoding for the character '{'

For other character sets, these values can and do
have different meanings. That's why standard C++
programs should never depend upon character encodings
but use character literals to express character values.

Finally, standard C++ has no notion of 'function keys',
'keys', 'keyboards' or any other particular hardware
device. All i/o is abstracted as 'streams of characters'.


Reply With Quote
izmirl izmirl is offline
Junior Member
Join Date: Oct 2011
Posts: 1
You can use function keys F1 etc also arrow keys etc using extended ascii codes. For instance ascii code for F1 key is (00,59) an array of two rather than one. You can use this in accelerator table in visual c++ as a shortcut key check below pages

UPDATE: Simpler method to add accelerator (shortcut key) in c++ MFC. Use accelerator table in resource view then

Another way to define an accelerator key is to right-click an entry or multiple entries in the Accelerator table, choose Next Key Typed from the shortcut menu, and then press any of the keys or key combinations on the keyboard. The Next Key Typed command is also available from the Edit menu.

Last edited by izmirl; 10-24-2011 at 08:34 AM..
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make send key ([tab] [tab]Text [Enter]) in some program (Internet Explorer or Notepad)? max Perl Misc 2 04-01-2007 10:12 AM
How can I capture tab key event and cancel default action of Tab key? HopfZ Javascript 0 01-08-2007 10:04 PM
Urgent: How can I get the enter key to behave like a tab key? Karen Grube ASP .Net Web Controls 3 11-29-2004 03:23 PM
Replace Tab Key to Return Key (Enter Key) from Web Forms? M P ASP General 1 08-06-2004 08:32 AM
ascii code for a tab? Ken Kafieh Java 10 05-15-2004 01:35 AM