Re: [AD] key scan codes have changed? |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] key scan codes have changed?
- From: Elias Pschernig <allefant@xxxxxxxxxx>
- Date: Sun, 1 May 2005 16:53:29 +0200
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tpO3T4NElF8fHwR+QnU/aGQHeA5F2zjorsNqxTjcDph1XY1PY84iTVzYhJNUE/qjDjrJ8izSmJmxIqzmHB/n5Vj9TbE0kkcYfm90GOU8T4l93TXYD6Q8TsCRw2oG/7fs10BvoOjSbnDI9jGX+5PH447GIZKKytLU3ZueDEQ07po=
>
> in /examples/exkeys.c
> the numpads NumLock key highlights the "Pause" indicator.
Yes, very odd. In fact, it writes "Pause" where it should say
"NumLock". The reason is in windows itself.. it returns "Pause" for
the scancode of the numlock key. It can be easily fixed with a special
case (so KEY_PAUSE and KEY_NUMLOCK won't be localized). Quite probably
I'm somehow doing something wrong here:
if (GetKeyNameText(reverse_mapping[scancode] << 16, str, sizeof str))
It returns 0 for the pause key (so simple Allegro's "PAUSE" is used as
text, but it returns != 0 for the numlock key, and writes the string
"PAUSE" into str. MSDN isn't really helpful here as well:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/getkeynametext.asp
> the two Alt keys produce different results when combined with other keys.
>
> one of the Alt keys produces a readkey() event.
Which one? The key labelled VK_RMENU here is always reported together
with the control flag (by windows), the key VK_LMENU is the left alt
key and reported as only the alt flag. I don't think there's much
point special casing this and "fixing" what windows reports..
> F1 and cntrl_F1 produce the same readkey() value
> F1 and shift_F1 produce the same readkey() value
They should.
> and alt also, whereas 4.1.17 gave different values.
>
What different values do they give?
> control_a and control_shift_a produce the same readkey() value (this
> 'bug' also occured in 4.1.17)
What should be different?