LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-06-2004, 09:28 AM   #1
joeyjwc
Member
 
Registered: Mar 2004
Distribution: Slackware 10.2, Fedora Core 5, Kubuntu
Posts: 61

Rep: Reputation: 15
Binding a key to start a program


Hi there. I'd like to bind a command to a key on an EagleTouch USB keyboard. It's a strange company and I can't find information on it's hot keys. There's a sleep button on it. What do I need to know in order to get this key to invoke a command in the console (i.e. cmatrix -a -l -s -u 3) so I can run a screensaver when I'm not using the computer. Is it also possible to have the computer automatically invoke the command after a certain period of time? Thanks for your help.
 
Old 07-06-2004, 10:09 AM   #2
MikeZila
Member
 
Registered: Jul 2004
Location: Parts Unknown
Distribution: Arch
Posts: 377

Rep: Reputation: 30
Are you using a desktop environment? Like KDE or Gnome? If you are, both offer ways for you to bind keys to events. KDE lets you do it with the "Menu Editor" under "System" in the K menu.
 
Old 07-06-2004, 10:12 AM   #3
joeyjwc
Member
 
Registered: Mar 2004
Distribution: Slackware 10.2, Fedora Core 5, Kubuntu
Posts: 61

Original Poster
Rep: Reputation: 15
Oh, sorry, I forgot to specify. I'm not using X at all. I'm just in a Linux console.
 
Old 07-06-2004, 10:36 AM   #4
MikeZila
Member
 
Registered: Jul 2004
Location: Parts Unknown
Distribution: Arch
Posts: 377

Rep: Reputation: 30
Ouch. I don't think you can do that just from a console. You could make a script, put whatever you wanted done into it, name it one letter and put it in a PATH folder. Then you'de have it two key-presses away, I don't know of anyway to bind hotkeys from just plain Linux. Best of luck, though.
 
Old 07-06-2004, 06:51 PM   #5
joeyjwc
Member
 
Registered: Mar 2004
Distribution: Slackware 10.2, Fedora Core 5, Kubuntu
Posts: 61

Original Poster
Rep: Reputation: 15
Thank you for your help. I did what you suggested and it works fine.
 
Old 07-07-2004, 11:23 AM   #6
MikeZila
Member
 
Registered: Jul 2004
Location: Parts Unknown
Distribution: Arch
Posts: 377

Rep: Reputation: 30
You're very welcome. Anytime.
 
Old 07-31-2004, 06:21 PM   #7
daperi
LQ Newbie
 
Registered: Aug 2003
Location: Basel, Switzerland
Distribution: ArchLinux
Posts: 10

Rep: Reputation: 0
i got here from google searching for a way to bind a key to a command in the console

in x i use xbindkeys and exactly the same i want to have in the console

e.g. ctrl-alt-ins should reboot the system (i use ctrlaltdel to halt it) and other key-combinations should run things not directly in the actually running shell (daemon-like keybinding)

does nobody know something like this? do we need to write it? :-) (not that i have time myself ;-) )
 
  


Reply



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
Key Binding mtecknology Linux - Software 0 07-28-2005 09:50 AM
key binding in gnome 2.8 on debian (mepis) deuce868 Linux - Software 0 01-19-2005 06:12 PM
Binding a program to a key fenice1976 Linux - Software 1 05-18-2004 01:02 PM
key binding to mouse event agb32 Linux - General 0 09-04-2003 09:19 AM
key binding? granny Linux - Newbie 2 03-11-2003 09:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:20 AM.

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
Open Source Consulting | Domain Registration