newLISP Fan Club

Forum => newLISP Graphics & Sound => Topic started by: cormullion on July 24, 2007, 02:40:28 AM

Title: Getting keystrokes while displaying images...
Post by: cormullion on July 24, 2007, 02:40:28 AM
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?
Title:
Post by: Lutz on July 24, 2007, 04:01:23 AM
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.
Title:
Post by: Lutz on July 24, 2007, 04:05:43 AM
... 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
Title:
Post by: cormullion on July 24, 2007, 08:02:37 AM
Cool! I'll work on other features until gs:key-event, which sounds perfect for the job...