LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-10-2006, 11:55 AM   #1
cibonato
LQ Newbie
 
Registered: Aug 2006
Posts: 6

Rep: Reputation: 0
Disable "Shift+left mouse button" combination (XFree86).


Ladies and genttlemen, I'd like to disable the combination Shift + left mouse button when running XFree86.

Those keys should work normally if used indenpendently but if used together they souldn't work.

It is the last thing blocking me to put my kiosk to work...

Greetings.

 
Old 08-17-2006, 12:25 PM   #2
soggycornflake
Member
 
Registered: May 2006
Location: England
Distribution: Slackware 10.2, Slamd64
Posts: 249

Rep: Reputation: 31
I don't think it's possible to do this in X.

In a pinch, you could run xbindkeys and trap shift+Button1

e.g. ~/.xbindkeysrc

Code:
"/bin/false &"
    shift+ b:1
However, a user could potentially kill xbindkeys if they can open a terminal.
 
Old 08-17-2006, 05:22 PM   #3
cibonato
LQ Newbie
 
Registered: Aug 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Ladies and genttlemen... it's solved.

Here is what I did:

1) XFree86 must think mouse does have just one button (it's because I do really want to avoid any button but the first):


Code:
Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/mouse"
        Option      "Buttons"   "1"
EndSection
The lines above go inside /etc/X11/XF86Config-4.

2) xmodmap makes the left mouse button be the sixth button, acording to imwheel manpage this is the thumb left button (this line goes inside $HOME/.xinitrc):


Code:
xmodmap -e "pointer = 6"

3) imwheel acts over the new sixth mouse button (this line goes inside $HOME/.imwheelrc):


Code:
".*"
None,           Left,           Button1
Shift_L,        Left,           M
Shift_R,        Left,           M
A little explanation... the first line makes imwheel act over ALL windows; the second tells to imwheel that the sixth button is infact the first and the 2 last tell to imwheel that when someone press Shift (Left or Right) + the sixth button it have to translation into an M (it could be any keysym).

I wont write too much because certainly I'll make too much mistakes, but to conclude... the idea is make the left button be another button whose can be controlled by imwheel. Furthermore, this solution is intended to be used in an implementation of a kiosk, that's why I made a keysym combination be translated into another one, that's why the mouse just does possess one button, etc.

Greetings.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
X.org/kde 3.3: mouse gets "stuck" at the left of the screen stefan_nicolau Linux - Software 4 09-26-2005 12:18 PM
how to disable "print screen" button sallyslicer Linux - Newbie 0 02-11-2005 02:32 PM
"extension "XFree86-DRI" missing on display" upgrading XFree86 to 4.3.0 on Sarge Moloko Debian 5 03-31-2004 05:06 PM
"I have a4 tech 5 button mouse but can't use the two for back&forward in browsing " aicholate Linux - Hardware 1 02-26-2004 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:12 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
Open Source Consulting | Domain Registration