Forum: Ruby on Rails keystrokes from browser

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
32833d3ac17df58279c087afe3f7cf92?d=identicon&s=25 mike.schwab (Guest)
on 2005-11-14 05:15
(Received via mailing list)
Gmail has keystrokes now and I'm kind of jealous.  What javascript
library are they using?  Any tips or leads on helper functions?

-Mike
1a3126ed98def5188d4fceabddd421b6?d=identicon&s=25 mando.escamilla (Guest)
on 2005-11-14 06:30
(Received via mailing list)
On 11/13/05, Mike Schwab <mike.schwab@gmail.com> wrote:
>
> Gmail has keystrokes now and I'm kind of jealous. What javascript
> library are they using? Any tips or leads on helper functions?
>
> -Mike


Mike,

I imagine they're using a custom onkeypress event handler to do their
keybinding mojo. I don't know what they're doing, but I know how I'd
approach the problem:

1) A body event handler (<body onkeypress='useViKeyBindings();'>)
2) Let useViKeyBindings check for keypress events, check the keycodes,
and
do something useful when it finds one I like.

I could be completely off my rocker, but that's how I'd start. Of
course,
where I end up tends to be pretty far from where I start, so you might
to
start somewhere else. Like San Francisco or something.
This topic is locked and can not be replied to.