love2d-community / love2d-book

A book about LÖVE, Games and Lua.
https://love2d-community.github.io/love2d-book
Other
112 stars 5 forks source link

Can't use arrow keys to scroll #11

Open kindfulkirby opened 6 years ago

kindfulkirby commented 6 years ago

I can scroll using the mouse wheel or PgUp/Dn but not the arrow keys. It's not strictly speaking necessary, but really weird to not be able to do that.

Is something capturing and throwing away arrow key events?

Tested in Vivaldi (Chromium based) & Firefox on Linux.

s-ol commented 6 years ago

Hm, probably related to how the love.js/emscripten/SDL combination handles input. Does clicking in and out of canvas' change aynthing?

s-ol commented 6 years ago

Nevermind, I probably blocked them on purpose in a cheap way to prevent the page floating around when you test the samples:

https://github.com/love2d-community/love2d-book/blob/master/book/docinfo.html

This should be changed to apply only when one of the canvas' has focus.