LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-06-2006, 07:26 PM   #1
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Rep: Reputation: 30
How to make the right mouse button run a script (event trigger)


Hello, I am creating a Digital Picture Frame out of an old laptop, and i'm doing it with DSL Linux.

I want to mount the mouse buttons on the side of the frame and have it so that when you press the buttons, scripts are launched. For example, when you press the right buttons, it may restart the slideshow program or even run something completely different like loading up a weather forcast page in Firefox. The other mouse button would do something different like load a video or something.

If there is a better idea/solution to what I am trying to accomplish, then please let me know. I'd really like to use a ps/2, serial or USB port and plug in like 3-4 buttons for different functions if that is possible. If you know of a hardware device I can buy (hopefully cheap), then please do tell.

-Thanks
 
Old 10-07-2006, 07:36 PM   #2
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
some type of keyboard or number keypad would be easier to set up then a mouse. it is quite easy to bind a keyboard key to a script but I'm not sure how you would bind a mouse button; plus this would make your mouse unuseable if you need to go in and fix or change something.

Last edited by johnson_steve; 10-07-2006 at 07:38 PM.
 
Old 10-07-2006, 08:37 PM   #3
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
So say I was to do it with the keyboard, how would i make the change so that when i hit the z key, a script is run?
-Thanks
 
Old 10-08-2006, 11:38 AM   #4
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
xbindkeys lets you bind actions to key.
 
Old 10-08-2006, 02:24 PM   #5
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
OK, i got xbindkeys installed and going, even added a few shortcuts in there, but I am unable to get any shortcuts that involve using the mouse to work.

For example
"beaver"
control + b:1


that should open beaver, using control plus mouse button 1. I tried b:2, b:3 and so on, but nothing worked. control + b:2 is even an example they use in the config file. What am a I doing wrong?

-Thanks
 
Old 10-17-2006, 02:29 PM   #6
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
OK, not sure how it didn't work before, but it's working nicely now.
 
  


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
run script at hotplug event AAnarchYY Linux - Hardware 1 07-21-2006 10:19 AM
Connect Gtk's key event with button pressed? Chowroc Programming 6 12-20-2004 02:52 PM
how to run script on event ppp0 interface going down ? qwijibow Linux - Networking 4 02-24-2004 07:08 AM
middle mouse button is paste.. but what if i dont have a mid mouse button? kublador Linux - Newbie 4 09-02-2003 09:59 AM
wheel trigger on the Mouse doesnt run?? emin Linux - General 7 10-07-2002 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:28 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