Page 1 of 1

Getting keystrokes while displaying images...

Posted: Tue Jul 24, 2007 9:40 am
by cormullion
Another question

- I'm writing a slideshow application which is going very well. I like the idea of controlling operations with keystrokes (eg space bar, arrow keys), which is common interface style these days. How could this be done without a text field or text area?

Posted: Tue Jul 24, 2007 11:01 am
by Lutz
Just like we have gs:mouse-event usable for any component in the system (not only canvas), we will have a gs:key-event, this is important for programming any games, I simply forgot about this. We will have another development version this week, where you will find gs:key-event.

Lutz

ps: as a workaround till then you could use gs:mouse-event and checking for the left/right button and modifier keys.

Posted: Tue Jul 24, 2007 11:05 am
by Lutz
... the button-demo.lsp has an example for usage and you can see how the modifier keys work, e.g. shift-left-mouse-button etc.

Lutz

Posted: Tue Jul 24, 2007 3:02 pm
by cormullion
Cool! I'll work on other features until gs:key-event, which sounds perfect for the job...