Re: [AD] ALLEGRO_KEY_PAD_ENTER on Windows

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


On 29.03.2011 08:47, Peter Wang wrote:
On 2011-03-22, torhu<torhu.lists@xxxxxxxxxx>  wrote:
 On 21.03.2011 18:22, Matthew Leverton wrote:
 >See<http://www.allegro.cc/forums/thread/606792>
 >
 >Attached is a 5.1 patch that adds support for the
 >ALLEGRO_KEY_PAD_ENTER on Windows. It's possible that other keys like
 >right control could use the new 'extended' flag as well, but I just
 >did the least amount of work to get the pad-enter key detected. Tested
 >via the keyboard event example.

 I've extended the patch.  The goal was to make the left and right
 versions of the modifier keys work independently of each other.  It
 works just fine for Ctrl and Alt, but the Shift keys are still
 problematic.

 I've also tried to simplify some of the code.

 Maybe the right way to do keyboard input for games is using
 WM_INPUT, but I don't feel like tackling that.  Windows API
 programming just isn't fun.

I get: 'MAPVK_VSC_TO_VK_EX' undeclared

Some googling suggest that it's missing from msvc 2005's headers, if that's what you're using. I'm using msvc 2008 express. Is it ok to just conditionally define it? The value is 3.

I guess I should run ex_keyboard_events on XP to make sure it's actually supported there. The docs just mention win2k. I'm using win7. I'll test later today.




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