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

Re: [MiNT] AES related question: How to keep track if my application is receiving input?



On Tue, Aug 31, 2010 at 2:06 AM, m0n0 <ole@monochrom.net> wrote:
>
> Am Montag, den 30.08.2010, 17:13 +0200 schrieb Paul Wratt
> <paul.wratt@gmail.com>:
>
>> This would be a good time to come up with a clean alternative, one
>> that allows for all JS mouse (button) & key actions
>>
>> onBeforeKeyDown
>> onKeyDown
>> onAfterKeyDown
>>
>> onBeforeKeyUp
>> onKeyUp
>> onAfterKeyUp
>
> How is onBeforeKeyDown & onBeforeKeyUp defined? I mean...
> onBeforeKeyDown is always, except the situation where onKeyDown &
> onKeyUp fires, isn't it?
>
> Greets,
> m
>

I cant say how it would work at an os level (yet) but the app knows
when KeyClick has happened, so it just has to fire the Before even
first, then the event, then the After even. it currently just needs to
be told about KeyDown, KeyUp events also

BTW both a KeyDown KeyUp even must be fired in order to get a valid
KeyClick in DOM & JS. onKeyDown is now often used in form input
verifiers that use ajax.

also for example
<input type=text onBeforeKeyDown="this.disabled=true;"
onAfterKeyUp="this.disabled=false">

At an OS level, I would say the keyboard would have to be absracted
(thru IKBD vector?), hence a keyboard driver, that could do the same
as described above

The only real question on that last point is:
 how would the events be supplied to the upper levels (program, aes,
etc) if they know the facility is available

As it happens this could also be simply extended to provide other key
& button (read: generic input) related functions (at the os level), if
it was a driver, maybe combining deadkeys + wmoose would make sense.
Or offering access to other input devices (Joystick, tablet,etc) -
someone has already asked for RFC for Joystick API

Paul