On Mon, Sep 13, 2010 at 18:09, Aaron Newton <[email protected]> wrote:
> Looking at it a bit more, this is possible. The way I would match events
> *except* others would be multiple keyboard instances and the
> Keyboard.stop(event) method.
>
> Create one keyboard instance that has your key assignments and another one
> that manages it that has a default handler. Your first one has
> Keyboard.stop(event) commands. Like so:
>
> var defaultK = new Keyboard().addEvent('keyup', function(event) {
> ...whatever is the default ... });
> var definedK = new Keyboard.addEvent('ctrl+s', function(event) {
> myapp.save(); Keyboard.stop(event); });
>
> defaultK.manages(definedK);
>
> I think that should do it.
>
>
Uhm nice example :) I'll try it a bit.
Thank you very much!
--
Andrea
>
>