[Ohrrpgce] SVN: jay/3923 gfx_directx: Fixed shift key problem, for real. :\ Adjusted keyboard inp

Ralph Versteegen teeemcee at gmail.com
Fri Oct 22 20:53:35 PDT 2010


On 23 October 2010 16:09, James Paige <Bob at hamsterrepublic.com> wrote:
> On Fri, Oct 22, 2010 at 07:58:01PM -0700, subversion at HamsterRepublic.com wrote:
>> jay
>> 2010-10-22 19:58:01 -0700 (Fri, 22 Oct 2010)
>> 407
>> gfx_directx: Fixed shift key problem, for real. :\ Adjusted keyboard input to be polled through GetKeyboardState() instead of window messages.
>>
>> The caps lock, num lock, and scroll lock must not be assigned correctly. The test app gfx_directx_test1.cpp tests positively that they return correctly, but the engine must be expecting different bits to be set?
>>
>> What bits does the engine expect for a toggle key?
>
> The engine has absolutely no concept of a toggle key. In the QB days, it
> expected toggle keys to behave exactly like regular keys. The gfx_fb
> backend emulated this.
>
> The gfx_sdl does it the same way except for the CAPSCLOCK key. If I
> understand correctly, SDL
> itself treats capslock as if it is always being held down when it is in
> the ON state.

This behaviour can be turned off in SDL 1.2.14 (and we do if we can),
but is always-on in SDL 1.2.13 or earlier.

> I am not sure what is best for the gfx_directx backend to do with toggle
> keys.
>
> I know we definitely need to fix any places where capslock us used for
> silly things. (Is the sprite editor color-picker the only remaining
> example of that? I can't remember for sure.)

You mean scrolling?

I don't know of any other place that we ever used capslock - not even
for capitalising!

On the other hand, we have some other toggle keys. Numlock/pause
in-battle is problematic; we need to add an alternative.

> ---
> James
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>



More information about the Ohrrpgce mailing list