Getting keystrokes while displaying images...

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
Locked
cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Getting keystrokes while displaying images...

Post 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?

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

Cool! I'll work on other features until gs:key-event, which sounds perfect for the job...

Locked