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.
mike.schwab (Guest)
on 2005-11-14 06: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
mando.escamilla (Guest)
on 2005-11-14 07:30
(Received via mailing list)
On 11/13/05, Mike S. <removed_email_address@domain.invalid> 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.