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

M

MadLucas

Here:



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 ...





MadLucas.
 
M

Mike Wahler

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'.

-Mike
 
Last edited by a moderator:
Joined
Oct 24, 2011
Messages
1
Reaction score
0
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

http://www.jimprice.com/jim-asc.shtml#keycodes

http://brebru.com/asciicodes.html

http://msdn.microsoft.com/en-us/library/ac6d7wde.aspx

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

[FONT=&quot]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.[/FONT]
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top