LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-04-2011, 10:45 AM   #1
MarcosPauloBR
Member
 
Registered: Feb 2011
Location: Santa Catarina - Brazil
Distribution: Slackware
Posts: 129

Rep: Reputation: 2
Question Handle keyboard button pressed signal


Hi people!

I'm learning Signals, and I have a question:

Is possible to make a handle when I press any of the keyboard buttons?

The SIGINT handles the Ctrl-C combination, but I want to handle if any keyboard button was pressed.

Can anybody helps me?

Thanks!
 
Old 07-04-2011, 11:32 AM   #2
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,619
Blog Entries: 29

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
See if this helps: http://www.linuxquestions.org/questi...andler-761272/

I had actually disabled the default interrupt handler and inserted this one.

Was a LQ Newbie that time, don't remember much details about it so.

P.S. See this one too: http://www.linuxquestions.org/questi...1/#post3956458

Last edited by TheIndependentAquarius; 07-04-2011 at 11:35 AM.
 
Old 07-05-2011, 09:51 AM   #3
MarcosPauloBR
Member
 
Registered: Feb 2011
Location: Santa Catarina - Brazil
Distribution: Slackware
Posts: 129

Original Poster
Rep: Reputation: 2
Anisha, it works!

Thanks!!!
 
Old 07-05-2011, 10:04 AM   #4
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,619
Blog Entries: 29

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
Which one out of those did you try, BTW?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Old Emachines does nothing except when the power button is pressed. theKbStockpiler Linux - Hardware 11 07-03-2011 01:05 PM
[SOLVED] Fluxbox - toolbar.button.pressed.color question Mr. Alex Linux - Newbie 1 03-12-2011 12:23 PM
Map a keypress to a GUI button (when keycode 175 pressed a GUI button pressed) wikapuki Linux - Desktop 0 09-16-2010 09:08 AM
Connect Gtk's key event with button pressed? Chowroc Programming 6 12-20-2004 01:52 PM
Automatic shutdown when power button pressed.. mr_smidge Linux - General 9 09-08-2003 02:16 AM


All times are GMT -5. The time now is 04:19 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration