[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] New AES keyboard messages



On Wednesday 30 March 2005 22:17, Adam Kłobukowski wrote:
> Hello
>
> I have idea of new type of messages AES could deliver to applications.
>
> The messages are Key pressed, Key released.
>
> Key pressed is sent only once when key is pressed, no mater what
> keyrepeat would produce.
> Key released is also sent only once, when key is released.
>
> That messages can be sent interleaved, ie when user presses multiple key
> at the same time.
>
> That messages should be new class of the messages, not included in any
> other class (esp. keyboard messages), for a call like event_multi. This
> is so application/AES would not need to waste time for handling unwanted
> keyrepeat messages.
>
> The main reason for adding this messages is SDL and gaming in overall
> under AES.
>
> (btw. SHIF, ALT, CONTROL should be also sent as such messages)
>
> Technical details lik API/ABI are left for discussion.
>
> Thanks for Ozk for being interested.

I remember similar question couple of years ago when I was still XaAES
maintainer

I reserved event MU_DYNAMIC_KEYBD for it, nothing more.
Didnt spent further thoughts about it at the time.
Presumely it was my intention to send the event when either a key was pressed
or released. A bit in kstate could be spent.

As for detection of single press of CTRL, ALT, SHIFT:
This requires facilitating in low level keyboard driver (IKBD).
Normally these states are only supplied in combination with
scancode generating keys.

I did implement the use of NKCC by XaAES via event MU_NORMKEYBD.
In stead of scancodes you get normalized ASCII character values.
This might be a good place to look into.

(NKCC by Harald Siegmund uses scancode and TOS translation tables
together with modifier keys for producing ASCII character codes independent
of keyboard language.)