Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-12-2006, 01:37 PM
|
#1
|
|
Member
Registered: Oct 2006
Location: California, USA
Distribution: Antix 12, Mythbuntu 11.10, Kubuntu 11.10, but mostly Lubuntu 12.10
Posts: 461
Rep:
|
How to have mouse button act as "enter" key in bash
Hello,
I'm setting up a digital picture frame out of an old laptop, and I want to mount the two mouse buttons on the frame and have them do cool stuff.
I have written a simple bash script and have installed xbindkeys.
When you click the right mouse button, xbindkeys loads my script which kills xbindkeys, leaving my mouse open for other uses.
So I'm trying to find out how i can make it so that the left and right mouse buttons act as my responses to the script. (like a yes,enter and a no,enter response)
For example,
Instead of:
"Press 1 then enter to run script1"
"Press 2 then enter to view next option" (the next option would be like: Press 1 then enter to run script2") and so on.
I'd like to have: "Press left mouse button to run script1"
and also to have: "Press right mouse button to view next option"
This way, my mouse sort of acts like it's own mini on screen display.
Also, how do i do it so that the right button could do this, i mean, i don't know how to do this using regular keys. From what i've seen, the enter key can get me to the next prompt, but how would i have it so that enter does one thing and say for example Backspace by itself does another thing (kinda like a virtual "2,enter" key)?
Last but not lease if anyone thinks there is a better way to do this, aka, a pre-existing program that can handle this, then please do let me know. Since i'm really new to this, having an aterm bash window open up isn't the prettiest thing on a nice looking digital picture frame.
|
|
|
|
10-17-2006, 01:27 PM
|
#2
|
|
Member
Registered: Oct 2006
Location: California, USA
Distribution: Antix 12, Mythbuntu 11.10, Kubuntu 11.10, but mostly Lubuntu 12.10
Posts: 461
Original Poster
Rep:
|
Found a workaround. you can delete this thread.
|
|
|
|
10-17-2006, 02:14 PM
|
#3
|
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,081
|
Hi xmrkite, would you mind posting the solution/workaround for the benefit of other people searching for similar solutions?
|
|
|
|
10-17-2006, 02:45 PM
|
#4
|
|
Member
Registered: Oct 2006
Location: California, USA
Distribution: Antix 12, Mythbuntu 11.10, Kubuntu 11.10, but mostly Lubuntu 12.10
Posts: 461
Original Poster
Rep:
|
The workaround I found was using xbindkeys. I decided not to go with a bash based menu option, but instead I got a few jpg/gif images that load fullscreen using feh. I start off by having the left click button open the main menu and then load a new xbindkeys config file which has the left button doing one thing and the right button doing another. Clicking the right button for example goes to the next option, the left button executes. At each click, a new xbindkeys config file is loaded. It makes for a lot of config files but the look of it is really nice, especially for someone who has no idea on how to program anything.
Hope that makes sense. If you like, i can give more details, including screenshots.
|
|
|
|
10-17-2006, 02:53 PM
|
#5
|
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,572
|
That sounds like something I'd like to do with a housekeeping script I wrote and use almost daily.
You might condider writing it up as a tutorial and uploading it to the LQ Tutorials page.
|
|
|
|
10-17-2006, 02:57 PM
|
#6
|
|
Member
Registered: Oct 2006
Location: California, USA
Distribution: Antix 12, Mythbuntu 11.10, Kubuntu 11.10, but mostly Lubuntu 12.10
Posts: 461
Original Poster
Rep:
|
I'm making a digital picture frame out of an old laptop and I wanted to have some control buttons, hence the mouse buttons. I probable will do a website when it's all said and done. With screenshots, scripts and more, it'll be very informative for someone looking to do something similar.
If you want, send me your email address, and i'll let you know when i get that site up (might be a month or two though)
|
|
|
|
10-17-2006, 05:39 PM
|
#7
|
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,081
|
Could you send me a pm here when it's done?
Cheers
|
|
|
|
10-17-2006, 05:51 PM
|
#8
|
|
Member
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353
Rep:
|
Or better yet, post the news here. That way, you could have 100s if not 1000s hits to your website..... ! ;-)
Last edited by kevkim55; 10-17-2006 at 05:52 PM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:24 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|