How do I find the virtual key code for a certain key?

I

Ikke

Hi everybody,

On the internet, I've found several lists of virtual key codes for use in
WM_KEYDOWN and WM_KEYUP, but not all of them.

How can I find out the (virtual) key code for a certain key? Is there a
complete list?

The keys I'm specifically looking for are ² and ³.

Thanks in advance,

Ikke
 
V

Victor Bazarov

Ikke said:
On the internet, I've found several lists of virtual key codes for use in
WM_KEYDOWN and WM_KEYUP, but not all of them.

How can I find out the (virtual) key code for a certain key? Is there a
complete list?

You're in a wrong newsgroup, Ikke. Try 'microsoft.public.win*'
hierarchy. Also consider a better source of information on Windows
programming: msdn.microsoft.com.

V
 
M

Marcel Müller

Ikke said:
Hi everybody,

On the internet, I've found several lists of virtual key codes for use in
WM_KEYDOWN and WM_KEYUP, but not all of them.

How can I find out the (virtual) key code for a certain key? Is there a
complete list?

First of all you have to chose the documentation of your operating
system, since there are nothing like virtual keys in the C++ language.
The keys I'm specifically looking for are ² and ³.

These are no virtual keys. It is character input, depending on your
keyboard layout.


Marcel
 
I

Ikke

First of all you have to chose the documentation of your operating
system, since there are nothing like virtual keys in the C++ language.

I assumed that the constants like VK_ESCAPE actually were virtual keys,
are they not?
These are no virtual keys. It is character input, depending on your
keyboard layout.

Surely ² or ³ should give the same code, whatever keyboard you're using,
no?

Thanks,

Ikke
 
A

Alexander Bartolich

Ikke said:
Marcel said:
[...]
How can I find out the (virtual) key code for a certain key? Is there
a complete list?

First of all you have to chose the documentation of your operating
system, since there are nothing like virtual keys in the C++ language.

I assumed that the constants like VK_ESCAPE actually were virtual keys,
are they not?

You are speaking about the Windows API (application programming
interface). This API can be used by about any programing language.
This should give a strong hint that it is not part of any programing
language.
Surely ² or ³ should give the same code, whatever keyboard you're using,
no?

Try to retrieve the key code in MS-DOS. You don't even have to change
your platform for that test.
 

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

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top