Thread: Receiving Esc buttom signal in C program to exit

  1. #1
    Registered User
    Join Date
    Jun 2015
    Posts
    5

    Question Receiving Esc buttom signal in C program to exit

    Hi,

    how can I close a C process by pressing Esc button? With signalling? By using signal.h?

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Have you done any searches for, say, "c programming escape key"? If not, try it. If so, what have you found?

  3. #3
    Registered User
    Join Date
    Jun 2015
    Posts
    5
    Hi,

    yes I have done a search with this exact key and tried these solutions but did not work such as: https://www.daniweb.com/software-dev...esc-is-pressed and The C++ program should exit as soon as he presses 'esc'

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    What OS/compiler are you using?

  5. #5
    Registered User
    Join Date
    Jun 2015
    Posts
    5
    MS VS 2008 (Windows 7)

  6. #6
    Registered User
    Join Date
    Jun 2015
    Posts
    1,640
    Quote Originally Posted by user111 View Post
    Hi,

    how can I close a C process by pressing Esc button? With signalling? By using signal.h?
    Is it a console program waiting for input at the command line?

    Is it a windowed program with a message loop and window routine?

    Do you want to stop a program that is not currently waiting for input?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. not receiving messages in server/client program
    By ueg1990 in forum C Programming
    Replies: 5
    Last Post: 07-08-2012, 07:57 PM
  2. Help with Receiving dbus signal
    By KevinA in forum C Programming
    Replies: 0
    Last Post: 08-21-2010, 09:29 AM
  3. Replies: 1
    Last Post: 03-21-2008, 08:15 PM
  4. Code to link a buttom to a new page
    By hpteenagewizkid in forum C# Programming
    Replies: 0
    Last Post: 04-25-2007, 12:39 PM
  5. receiving notification when user runs a program
    By hanhao in forum C++ Programming
    Replies: 4
    Last Post: 01-13-2006, 11:23 PM

Tags for this Thread