On Sat, 13 Oct 2001, Phlip wrote:
> Rubescents:
> Ogle this snip:
>         signal_connect("key_press_event") { |w, e|
>             puts e.keyval  }
> Those keyvals come out as big honkin' numbers, like 65470.
> Is there some facility in gtk.rb, or in gtk+, that can convert these
> numbers to humane strings, such as "F1"? I have seen this ability
> before in other libraries with the letters TK in them.

I don't know about Gtk, but using RubyX11 (version 0.5), you can do:

require "X11/Keysyms"
p X11::KeysymdefReverse[65470]

#==> "F1"

________________________________________________________________
Mathieu Bouchard                   http://hostname.2y.net/~matju