News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Escape Key exits window
Author Message
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #1
RE: Escape Key exits window

This'll do it :

Code:
function esc_callback(myValue)

   if (Fl:event() == 12) and (Fl:event_key() == fltk.FL_Escape) then
       print ("No quit on Escape")
       io.flush()
   else
       os.exit()
   end
end

w=fltk:Fl_Window(0,0, 200, 200, "esc demo")

w:callback(esc_callback)

... Rest of program ...

06-23-2007 12:29 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Escape Key exits window - iGame3D - 06-21-2007, 06:39 AM
RE: Escape Key exits window - mikshaw - 06-22-2007, 07:38 AM
RE: Escape Key exits window - JohnMurga - 06-22-2007, 10:02 PM
RE: Escape Key exits window - JohnMurga - 06-23-2007 12:29 AM
RE: Escape Key exits window - mikshaw - 06-23-2007, 01:34 AM
RE: Escape Key exits window - JohnMurga - 06-23-2007, 01:57 AM
RE: Escape Key exits window - mikshaw - 06-23-2007, 06:22 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: