LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-12-2004, 10:09 AM   #1
superztnt
LQ Newbie
 
Registered: Jun 2004
Location: Iowa
Distribution: Suse 9.0, Fedora Core 2
Posts: 18

Rep: Reputation: 0
Question How do you identity buttons in a script?


I was wondering how to make a combination of buttons make a certain event happen and how to change those buttons? Like in the /etc/inittab file on this RH 7.2 box here at school it has a line to shutdown when control-alt-delete butttons are pushed. It looks like this:

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

I also like to know where to look to know how linux knows what key is pushed. If you know and dont want to give the answer away to a noob then just point me in the right direction. I'm not afraid of doing research. I have looked and looked for this on google and some books but I have had no luck. Maybe I'm using the wrong words to search or something but I'm frustrated now.

What I'm trying to do is create a script on a Unix system here at school so that when I hit a certain combination of buttons or one button it will execute something. Thanks.


Jason Z.
 
Old 07-12-2004, 01:35 PM   #2
BluePyre
Member
 
Registered: Mar 2004
Location: London
Distribution: Mandrake 10
Posts: 172

Rep: Reputation: 30
Theres a big difference to how Linux knows a key has is pushed, or how an application knows a key has been pushed.

I could point you in the right direction if you're wanting to use C++, and that direction is Qt, a GUI interface designer and toolkit / API (with member functions for things like key presses)
 
Old 07-12-2004, 03:43 PM   #3
superztnt
LQ Newbie
 
Registered: Jun 2004
Location: Iowa
Distribution: Suse 9.0, Fedora Core 2
Posts: 18

Original Poster
Rep: Reputation: 0
Well the system that I'm working on is a RS/6000 running AIX version 3.2. So I don't have the ablilities to run GUI apps. Is there a keyboard configuration file somewhere that I should look for? I have been poking around the file system trying to find something but I have found anything yet.
What I am trying to do is create a script that will run in the background that will let me go through the bash history like in Linux where you can just up arrow. The RS/6000 has a vi command-line editor, but I want to change it so it is more like Linux.
 
  


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
Corporate Identity Distro lionlion Linux - General 1 07-16-2005 03:59 PM
Identity Theft Post Modern Linux - Security 3 05-05-2005 07:12 PM
user identity oeivindh76 Linux - Security 1 10-06-2004 05:49 PM
identity crisis spedsta Linux - Networking 2 06-18-2004 11:20 AM
Monitor refresh and identity blitzen Linux - Hardware 0 04-24-2004 08:11 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:35 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration