Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
single button right click modifier key
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
GN2PPC
n00b
n00b


Joined: 17 Nov 2004
Posts: 3

PostPosted: Wed Nov 17, 2004 9:23 pm    Post subject: single button right click modifier key Reply with quote

I'm trying to figure out how to configure x.org so that when I click while holding down the control key, it emulates a right click.

I'm finding information on how to make a key press act as a right mouse click, but I just want to use a modifier key with the regular mouse button.

Someone please tell me this is possible!
Back to top
View user's profile Send private message
cummings66
n00b
n00b


Joined: 22 Feb 2004
Posts: 42
Location: Moberly, MO

PostPosted: Thu Nov 18, 2004 3:17 am    Post subject: Reply with quote

It's not possible. You can edit the sysctl.conf file and do something similar with the function keys.

When you edited the kernel and setup the apple adb stuff there was a message that told you what entries to add to the file.

This is that part.
# Enable mouse button emulation
dev.mac_hid.mouse_button_emulation = 1
# Set 2nd button to 87 - F11
dev.mac_hid.mouse_button2_keycode = 87
# Set 3rd button to 88 - F12
dev.mac_hid.mouse_button3_keycode = 88

You need to have the kernel configured for the 2+3 stuff. You'll find it under Device Drivers and under it Macintosh device drivers. Then look for support for ADB input devices (keyboard, mice, ...) and support for mouse button 2+3 emulation. Recompile and make sure the previous example is in the /etc/sysctl.conf file and reboot. The keycodes can be changed to change what function key is used, xev will show the keys.
Back to top
View user's profile Send private message
DiskBreaker
Apprentice
Apprentice


Joined: 07 Oct 2003
Posts: 224

PostPosted: Thu Nov 18, 2004 4:20 am    Post subject: Reply with quote

Actually it is possible and there was a kernel patch do that... that way you will feel much more comfortable in Linux coming from OS X.

The patch ist still here:
http://geekounet.org/patches/files/rclick_key_modifier-2.4.23.diff
mentioned in this thread.

Obviously this was written a while ago for 2.4 kernels and will not work with 2.6, but the changes that will have to be made to adapt it to 2.6 shouldn't be too difficult to make... I can't look into it right now but maybe somebody else will be up to it or you could pm the original author...

Have fun,
DiskBreaker
Back to top
View user's profile Send private message
GN2PPC
n00b
n00b


Joined: 17 Nov 2004
Posts: 3

PostPosted: Thu Nov 18, 2004 8:33 am    Post subject: Reply with quote

Thanks DiskBreaker. That patch looks really nice. I'll check it out more closely soon!
Back to top
View user's profile Send private message
colinleroy
n00b
n00b


Joined: 24 Nov 2003
Posts: 50

PostPosted: Thu Nov 18, 2004 1:18 pm    Post subject: Reply with quote

Hi,

i'm the author of the patch and just want to point out that with 2.6 kernels, using mouseemu (in portage) with uinput support in the kernel allows that and much more flexibility (including mouse wheel emulation and touchpad block-while-typing).

hth :)
Back to top
View user's profile Send private message
GN2PPC
n00b
n00b


Joined: 17 Nov 2004
Posts: 3

PostPosted: Thu Nov 18, 2004 9:02 pm    Post subject: Reply with quote

Thanks colinleroy,

i must be missing a package because when i try to emerge mouseemu i get the following error. do you happen to know whick package i'm missing (or how i can figure that out)?

emerge output:
>>> md5 src_uri ;-) mouseemu.tar.gz
>>> Unpacking source...
>>> Unpacking mouseemu.tar.gz to /var/tmp/portage/mouseemu-0.12/work
* Applying mouseemu-0.12-fix.diff ... [ ok ]
>>> Source unpacked.
gcc -Wall -g -o mouseemu mouseemu.c
mouseemu.c:26:26: linux/uinput.h: No such file or directory
mouseemu.c: In function `report_click':
mouseemu.c:76: error: `EV_SYN' undeclared (first use in this function)
mouseemu.c:76: error: (Each undeclared identifier is reported only once
mouseemu.c:76: error: for each function it appears in.)
mouseemu.c:76: error: `SYN_REPORT' undeclared (first use in this function)
mouseemu.c: In function `report_scroll':
mouseemu.c:90: error: `EV_SYN' undeclared (first use in this function)
mouseemu.c:90: error: `SYN_REPORT' undeclared (first use in this function)
mouseemu.c: In function `register_inputhandler':
mouseemu.c:244: error: `EVIOCGRAB' undeclared (first use in this function)
mouseemu.c: In function `unregister_inputhandler':
mouseemu.c:261: error: `EVIOCGRAB' undeclared (first use in this function)
mouseemu.c: In function `uinput_close':
mouseemu.c:295: error: `UI_DEV_DESTROY' undeclared (first use in this function)
mouseemu.c: In function `uinput_setup':
mouseemu.c:338: error: storage size of 'device' isn't known
mouseemu.c:360: error: `UI_SET_EVBIT' undeclared (first use in this function)
mouseemu.c:362: error: `EV_SYN' undeclared (first use in this function)
mouseemu.c:364: error: `UI_SET_RELBIT' undeclared (first use in this function)
mouseemu.c:368: error: `UI_SET_KEYBIT' undeclared (first use in this function)
mouseemu.c:379: error: `UI_DEV_CREATE' undeclared (first use in this function)
mouseemu.c:338: warning: unused variable `device'
make: *** [all] Error 1
Back to top
View user's profile Send private message
colinleroy
n00b
n00b


Joined: 24 Nov 2003
Posts: 50

PostPosted: Fri Nov 19, 2004 9:38 am    Post subject: Reply with quote

Probably kernel headers or kernel source... Can't say with 100% confidence because I just remotely crashed my gentoo ibook when trying to apply BenH's new sleep patch :)
Back to top
View user's profile Send private message
bruda
Guru
Guru


Joined: 06 May 2004
Posts: 376
Location: Sherbrooke, QC, Canada

PostPosted: Fri Nov 19, 2004 2:21 pm    Post subject: Reply with quote

GN2PPC wrote:
gcc -Wall -g -o mouseemu mouseemu.c

This lacks a -I/usr/src/linux/include flags (mouseemu should be compiled against the kernel headers). It is strange, because on my system the tarball is already patched, I did nto have to do anything to build the thing. In any case, try to apply this patch to the source and it should build fine.
Code:
--- Makefile.orig       2004-11-19 09:16:54.081125215 -0500
+++ Makefile    2004-01-19 06:37:11.000000000 -0500
@@ -1,5 +1,5 @@
 all:
-   gcc -Wall -g -o mouseemu mouseemu.c
+   gcc -Wall -I/usr/src/linux/include -g -o mouseemu mouseemu.c
 clean:
    rm -f *.o core* mouseemu
 install:


edit: the things prefixing gcc should be of course tabs, they are tabs in the source of my posting even if they show up as sequences of blanks in the resulting posting.
_________________
Quid latine dictum sit altum videtur
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum