LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-21-2007, 11:05 AM   #1
barbar
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Rep: Reputation: 0
KDE and right click with one button mouse


I installed slackware 11.0 on a touchscreen device. Unfortunately I can not get the evtouch driver running. I found a solution with the gunze driver. This driver only supports left click events.

Is there a way to map a Shift+left-click event to a right-click using x11 and kde?

I already tried to map a function key (F11) to right click using
Code:
~.Xmodmap: 
keycode 95 = Pointer_Button3
But this did not work.

Any ideas are appreciated
 
Old 03-21-2007, 12:56 PM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
I wonder if using KDE's option "Auto Select Icons" in the Control Center, combined with going to the Control Center "Application & themes --> Desktop --> Behaviour" and configuring the mouse button you have to do the function of the right button.

Perhaps this is not exactly what you have in mind, but is just a suggestion. I don't know how to remap things yet.
 
Old 03-21-2007, 01:43 PM   #3
barbar
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Original Poster
Rep: Reputation: 0
I tried your suggestion. But I did not work. I need to keep the left click functionality, so I think of remapping the events to keep the left click actions.
 
Old 03-23-2007, 10:09 AM   #4
barbar
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Original Poster
Rep: Reputation: 0
I found a program named mouseemu which seems to do what I need.
It can define a ctrl+click as right click.

I used different setting like
Code:
mouseemu -middle 0 0 -right 29 272 
or 
mouseemu -middle 0 0 -right 29 68
The last number is the keycode for left+click. The number 272 is from the man page of moueseemu. 68 is the code for the click I found out using xev.

It does not work so far.
Any ideas how I can find out the code for left click?
 
Old 03-31-2007, 06:50 AM   #5
barbar
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Original Poster
Rep: Reputation: 0
KDE and right click with one button mouse [Solved]

Inspired by http://samengstrom.com/p1510 I wrote a small perl script which emulates a right-click event.
Code:
#!/usr/bin/perl -w
#
#
use strict;
use X11::GUITest qw (:ALL);
my $mouse = IsMouseButtonPressed (M_LEFT);

while ( $mouse < 256 ) {
    $mouse = IsMouseButtonPressed(M_LEFT);
}

if ( $mouse == 256 ) {
    my ( $x, $y ) = GetMousePos();
    MoveMouseAbs( $x, $y );
    ClickMouseButton M_RIGHT;
}
The script is not a perfect solution but it fits my needs.
 
Old 02-04-2012, 01:00 PM   #6
leonc
LQ Newbie
 
Registered: Dec 2011
Posts: 2

Rep: Reputation: Disabled
2011 now and this little script works for me in fedora and slackware. I was searching for ages looking for this function to use on a touchscreen.
 
  


Reply

Tags
perl, touchscreen


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
KDE Menu by mouse click Shafted Linux - Software 2 04-02-2007 03:31 AM
make thumb button/third button double-click taboom Linux - Hardware 0 03-20-2006 02:39 PM
mapping Logitech mouse thumb button to double-click buldir Linux - Hardware 3 12-04-2004 09:11 PM
Assigning 'double-click' to a specific mouse button theMonkeY Linux - Hardware 1 09-06-2004 07:11 AM
Command line way to click a mouse button. danielw Linux - General 6 09-02-2003 03:52 AM


All times are GMT -5. The time now is 04:44 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration