On Thu, 26 Aug 2004 03:30:41 +0900, Martin Ankerl
<martin.ankerl / gmail.com> wrote:

> data.code seems to contain some kind of keycode, but I could not
> figure out if somewhere constants are defined for the keys (like,
> FX_KEY_DOWN or something like this).

Look at fox/keys.rb, which defines symbolic constants for all of the
key codes, e.g.

    require 'fox/keys'

    @input.connect(SEL_KEYPRESS) do |sender, sel, data|
        case data.code
            when KEY_Left
                puts "left"
            when KEY_Right
                puts "right"
            when KEY_Up
                puts "up"
            when KEY_Down
                puts "down"
        end
    end

You might also try searching the (old) mailing list's archives for
SEL_KEYPRESS, as it seems like this question has come up before.
Here's a link to the old mailing list's archives:

    http://sourceforge.net/mailarchive/forum.php?forum_id=33510

Hope this helps,

Lyle