I'm trying to use the keypress event in a URL-based (multi-page, in
theory) Shoes app, but I can't get it working. Given that I'm new to
Shoes, it seems likely this is my fault. The code below seems like it
should work to me, what am I doing wrong (if anything)? Making it non-URL
based and putting the keypress event handler inside the Shoes.app block
works fine, but once I subclass Shoes and make it use URLs, it stops
working.
Any help appreciated. :)
- Sarah
---
class TestShoes < Shoes
url '/', :index
def index
keypress do |key|
alert(key.inspect)
end
end
end
Shoes.app