LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   KDE and right click with one button mouse (http://www.linuxquestions.org/questions/slackware-14/kde-and-right-click-with-one-button-mouse-539357/)

barbar 03-21-2007 11:05 AM

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

GrapefruiTgirl 03-21-2007 12:56 PM

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. :)

barbar 03-21-2007 01:43 PM

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.

barbar 03-23-2007 10:09 AM

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?

barbar 03-31-2007 06:50 AM

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.

leonc 02-04-2012 01:00 PM

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.


All times are GMT -5. The time now is 08:46 PM.