guile-gtk-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: handling key-press events


From: Paul Emsley
Subject: Re: handling key-press events
Date: Thu, 14 May 2009 19:42:10 +0100
User-agent: Thunderbird 2.0.0.21 (X11/20090302)

tantalum wrote:
Hi,

Can anyone show me with a little code snippet, how to
check for a specific key pressed with a key-press-event? I could not find the answer myself.



     (gtk-signal-connect entry "key-press-event"
             (lambda (event)
               (if (= 65293 (gdk-event-keyval event)) ; GDK_Return
               (begin
                 (handle-your-string entry)
                 (gtk-widget-destroy window)))

I don't know that the keysyms are available at the guile level - I had to translate from gdkkeysyms.h :)

Paul.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]