Running an application by pressing a key on keyboard
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Running an application by pressing a key on keyboard
Hi,
I am a beginner to linux programming language and still learning how things work in linux, hence this doubt.
I want to run an application i.e. Twinkle to be specific on linux by pressing a key on my keyboard, to be specific the letter 'C'.How do i go about this. Please can you help!Its urgent.
waiting in anticipation
Thanks
jack
Last edited by queries34986@gmail.com; 10-30-2012 at 06:44 AM.
Reason: Help its urgent!
I'm not really sure, but it looks very strange for me. Using GUI the keyboard events are handled by the current application (determined by the focus), this can be hardly modified. You can implement an app to use your own handler, but it will only work when app is focused.
What kind of language do you plan to use?
Most of the major desktop environments include some kind of hotkey system. Check your configuration system or try a google search or two.
There's also xbindkeys for a more system-agnostic solution.
But I don't think you want to run a command with just "C". How could you type that way? You need some kind of modifier key to combine with it or else you'll be constantly launching it.
You obviously don't want "c" to launch anything: if it did, you'd never have typed "Jack"! Usually one uses the Super key (the one with the Windows logo) in conjunction with another key, so I have
Super+f for the command "nautilus /"
Super+h for "nautilus"
With Mate, Xfce, or Gnome, there's a tool available to set up shortcuts in the menu.
If you are using KDE, you can set a shortcut for a particular program by using the menu editor, right clicking on the program, and choosing Properties. I don't know how you set complex commands, though.
Actually I am trying to implement a VOIP application with the help of twinkle software which is linux based.I want to launch this app whenever i press a single key e.g like in case of an intercom.
So my question is whether i need to program such a thing in linux or are there hotkeys or some app in linux to do the same?
Actually I am trying to implement a VOIP application with the help of twinkle software which is linux based.I want to launch this app whenever i press a single key e.g like in case of an intercom.
So my question is whether i need to program such a thing in linux or are there hotkeys or some app in linux to do the same?
As many posters above already wrote: it has nothing to do with Linux. If you're running X11, it depends on your Windowmanager, read the documentation for your Windowmanager. I know Xmonad and fvwm2 very well and can say that for those it is relatively easy to configure a hotkey to launch an application.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.