f



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

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
0
ikke1 (91)
8/19/2009 8:14:56 PM
comp.lang.c++ 49423 articles. 7 followers. Post Follow

5 Replies
655 Views

Similar Articles

[PageSpeed] 45

Ikke wrote:
> 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
-- 
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
0
v.Abazarov (13256)
8/19/2009 8:17:41 PM
Ikke wrote:
> 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
0
news.5.maazl (212)
8/19/2009 8:21:21 PM
Marcel M�ller <news.5.maazl@spamgourmet.org> wrote in
news:4a8c5ec1$0$31861$9b4e6d93@newsspool3.arcor-online.net: 

> Ikke wrote:
>> 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.

I assumed that the constants like VK_ESCAPE actually were virtual keys, 
are they not?
 
>> The keys I'm specifically looking for are � and �.
> 
> 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
0
ikke1 (91)
8/19/2009 9:38:54 PM
Ikke wrote:
> Marcel M�ller wrote:
>>> [...]
>>> 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.

>>> The keys I'm specifically looking for are � and �.
>> 
>> 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?

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

-- 
Br�der, in die Tonne die Freiheit,
Br�der, ein Stoppschild davor.
Egal was die Schwarzen Verlangen
Rufen wir: Ja! Brav im Chor.
0
8/19/2009 9:51:24 PM
Ikke wrote:
> 
> Surely � or � should give the same code, whatever keyboard you're using, 
> no?
> 

Before you go off to one of the microsoft-specific newsgroups Victor 
suggested, you might like to consider this:  My UK keyboard doesn't have 
those keys.  So how can they give the same code?

Andy
0
no.way3 (205)
8/19/2009 10:17:41 PM
Reply: