[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (Guile-SDL) Feature request: Return integer value for keysym in proc
From: |
Thien-Thi Nguyen |
Subject: |
Re: (Guile-SDL) Feature request: Return integer value for keysym in procedure event:key:keysym:sym |
Date: |
Tue, 25 Jun 2013 15:49:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
() David Thompson <address@hidden>
() Mon, 24 Jun 2013 22:40:01 -0400
event:key:keysym:sym returns a symbol, but it would be nice if there
was a way to get the actual integer value of the keysym as well.
I'm writing an input module for a game library and I'm wrapping up the
keycodes into their own enumeration with a macro like so:
(define-enumeration [...] ...)
Unfortunately, this doesn't work because there's no way to get the
keycode as integer. I can see how returning a symbol is nice, but it
would be also be nice to not hide the integer value underneath.
Thoughts?
This code:
keysyms-alist.scm
Description: application/scheme
shows how to extract the underlying integer value using the Guile-SDL
reflection facilities. Does that help?
--
Thien-Thi Nguyen
GPG key: 4C807502
pgpYbUVZ8136l.pgp
Description: PGP signature