Re: [AD] key scan codes have changed?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


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




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/