Export to GitHub

cakejs - issue #2

Keyboard handling


Posted on Mar 12, 2008 by Helpful Kangaroo

There is currently no way to get key events with CAKE, nor is keyboard focus handled.

There should be a system to manage which canvas node has keyboard focus, and dispatching key events to it. The Canvas should also keep track of which keys are currently depressed.

Comment #1

Posted on Mar 18, 2008 by Helpful Kangaroo

(No comment was entered for this change.)

Comment #2

Posted on Mar 18, 2008 by Helpful Kangaroo

Copy keyboard handling code from MegaPong?

Comment #3

Posted on Mar 21, 2008 by Helpful Kangaroo

See http://glimr.rubyforge.org/cake/canvas.html#KeyboardTest and cake.js Canvas event listener code (search for keyTarget)

Comment #4

Posted on Mar 22, 2008 by Grumpy Monkey

Sorry I have been long to get into it (my spare time is taken by another project we are currently finalizing before release).

The keyboard demo does not work (on my linux x86 + firefox2 box at least). Maybe it is expected? If not i'll try to investigate.

Regards, Jeko

Comment #5

Posted on Mar 22, 2008 by Helpful Kangaroo

No problem, take your time.

Odd though, it works on my linux 64-bit + firefox2. When you click a shape, it should light up to show that it's focused. It might also be numpad arrows vs. separate arrows :?

If it still persists, change status to Started and let's fix it.

Comment #6

Posted on Mar 23, 2008 by Grumpy Monkey

Tried on my linux64 + firefox2 and it works here. I don't understand why it behave differently on those two platforms. I'm gonna check this.

Comment #7

Posted on Aug 2, 2008 by Helpful Kangaroo

(No comment was entered for this change.)

Status: Fixed

Labels:
Type-Enhancement Priority-Medium