[AD] Question about keyboard handling (431)

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


Hi all.

I've just tracked down a problem with a game I was compiling for Amiga OS
where text input was being problematic.  It turned out that if I press
shift (or any modifier key) then the value returned by readkey() will have
the scancode for shift in the upper byte but zero in the lower byte.

This doesn't seem right.  In my keyboard handler, when I call the internal
_handle_key_press() and pass in the ASCII code and the scancode, what
should I pass in for the ASCII code?  Currently I am passing in zero if a
modifier key is pressed.  What about for other keys such as the function
keys?  They don't have an ASCII code, but if you pass in zero then it will
filter through to readkey() and cause problems for client software.

I would say that readkey() returning the value as described above is
correct, except that it doesn't seem to do it for other platforms.  So I'm
not sure what I should do here in my keyboard handler.  Any ideas?

-- 
/-------------------------------------------------------------------\
[Hitman/Code HQ - 6502/z80/68000/604e/80x86/ARM coder - Amiga rulez!]
[VZ-200/VIC-20/MZ-700/c16/c64*10/c128*8/Plus-4/CPC464/CD32/500*2    ]
[600/1000/1200*2/A4000/SNES/N64/Dreamcast/Athlon 1100/AmigaOne      ]
[Assembly Language: The most fun you can have with your clothes on! ]
\-------------------------------------------------------------------/





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