![]() ![]() |
Feb 2 2008, 12:09 PM
Post
#1
|
|
![]() Group: Members Posts: 409 Joined: 3-December 06 Member No.: 13,063 |
Is it possible to have something like
Fn + tap = right click ( ONE time only ) ? Not like "To change in right click mode, press something, to change it back to left click mode, press something else". I hate this. Ah, even tap and hold would work when keyboard cannot be used. |
|
|
|
Feb 2 2008, 01:37 PM
Post
#2
|
|
![]() Group: Members Posts: 2,350 Joined: 30-July 06 Member No.: 10,575 |
I'm slowly working on an Xlib program that does just that (Angstrom has the same issue), but, not having used Xlib before, it's going VERY slowly.
|
|
|
|
Feb 2 2008, 10:41 PM
Post
#3
|
|
![]() Group: Members Posts: 409 Joined: 3-December 06 Member No.: 13,063 |
How slowly means "Slowly" ?
|
|
|
|
Feb 3 2008, 08:06 AM
Post
#4
|
|
|
Group: Members Posts: 28 Joined: 6-April 06 Member No.: 9,556 |
Is it possible to have something like Fn + tap = right click ( ONE time only ) ? It seems that xbindkeys can do that (I have not tried it). .xbindkeysrc segment in yonggun's setting: #Middle Click "xmodmap -e "pointer = 2 3 1"" m:0x0 + c:68 XF86LaunchB #Right click "xmodmap -e "pointer = 3 1 2"" m:0x0 + c:76 XF86LaunchC And, you can try libgtkstylus in GTK+ 2.x based applications. It emulates stylus right click effect. You can download it here. |
|
|
|
Feb 3 2008, 08:57 AM
Post
#5
|
|
![]() Group: Members Posts: 2,350 Joined: 30-July 06 Member No.: 10,575 |
How slowly means "Slowly" ? Well, right now I'm trying to figure out how to just make a click event happen. Once I get that, it ought to just be a matter of checking for a key's state (ex, Fn) at every mouse button event. If it's down, grab the mouse button event and make a new one, except with a different button. So if you know how to use Xlib or can figure out how to do that with Xlib, that would be very helpful. EDIT: I think I've got it now. Hopefully some code will be up soon. |
|
|
|
Feb 3 2008, 06:01 PM
Post
#6
|
|
![]() Group: Members Posts: 2,350 Joined: 30-July 06 Member No.: 10,575 |
OK, it appears I'd either need to put the code in the WM (going to do that for EvilWM) or give the daemon a window (no idea how that would work).
Here's the code that will instantly click the right mouse button. Do what you want with it, I'll hopefully be able to post something more functional later. It should compile with the command CODE g++ -o mouseclick mouseclick.cpp -lX11
Attached File(s)
|
|
|
|
Mar 15 2008, 10:48 PM
Post
#7
|
|
|
Group: Members Posts: 2,003 Joined: 16-April 04 From: the Netherlands && /dev/null Member No.: 2,882 |
Here are the compiled EABI binaries for mouse right and middle buttons. The source is included.
To use: Just drop the binaries somewhere, and use a WM configuration tool to assign the keymapping. Press them to make the "clicks". No tap or no switching back and forth is needed. Thanks, Capn_Fish! (The tarball is corrected now)
Attached File(s)
|
|
|
|
Mar 16 2008, 12:34 AM
Post
#8
|
|
|
Group: Members Posts: 70 Joined: 6-January 07 Member No.: 13,740 |
Here are the compiled EABI binaries for mouse right and middle buttons. The source is included. To use: Just drop the binaries somewhere, and use a WM configuration tool to assign the keymapping. Press them to make the "clicks". No tap or no switching back and forth is needed. Thanks, Capn_Fish! Thanks for the file zdevil! Just to let you know though, this is the source file, not binary. Canguy |
|
|
|
Mar 16 2008, 12:52 AM
Post
#9
|
|
|
Group: Members Posts: 2,003 Joined: 16-April 04 From: the Netherlands && /dev/null Member No.: 2,882 |
Oh sorry, just corrected the tarball. Please download again.
|
|
|
|
Mar 17 2008, 11:47 PM
Post
#10
|
|
|
Group: Members Posts: 28 Joined: 6-April 06 Member No.: 9,556 |
mouseclick.tar.gz Hi, I simplified this C++ program to pure C program. It links less libraries and responds a little more quickly (for machine). (Of course, human can not feel the tiny speed up...) Just extract the tarball and run "make" in the directory. Thanks to Capn_Fish for the information. Download: mouseclick-20080424.tar.gz |
|
|
|
Mar 20 2008, 02:55 AM
Post
#11
|
|
|
Group: Members Posts: 124 Joined: 16-January 05 Member No.: 6,248 |
Is it possible to have something like Fn + tap = right click ( ONE time only ) ? Not like "To change in right click mode, press something, to change it back to left click mode, press something else". I hate this. Ah, even tap and hold would work when keyboard cannot be used. If the X server supports the XKB extension you can use xmodmap to map the mouse buttons onto the keyboard, see http://www.geocities.jp/fred_b_maciel/kbd/kbd-e.html. |
|
|
|
Mar 20 2008, 10:08 AM
Post
#12
|
|
|
Group: Members Posts: 2,003 Joined: 16-April 04 From: the Netherlands && /dev/null Member No.: 2,882 |
If the X server supports the XKB extension you can use xmodmap to map the mouse buttons onto the keyboard, see http://www.geocities.jp/fred_b_maciel/kbd/kbd-e.html. Interesting... So what does "...On .xinitrc, I read the symbols with xmodmap from a file that contains the lines below. This maps the keys to the buttons; shift-key combinations lock/unlock the buttons..." means? How to check the keycodes for Pointer_Button1/2/3 (not in /etc/X11/kb/blah/*.xmodmap)? |
|
|
|
Mar 21 2008, 02:17 AM
Post
#13
|
|
|
Group: Members Posts: 124 Joined: 16-January 05 Member No.: 6,248 |
If the X server supports the XKB extension you can use xmodmap to map the mouse buttons onto the keyboard, see http://www.geocities.jp/fred_b_maciel/kbd/kbd-e.html. Interesting... So what does "...On .xinitrc, I read the symbols with xmodmap from a file that contains the lines below. This maps the keys to the buttons; shift-key combinations lock/unlock the buttons..." means? How to check the keycodes for Pointer_Button1/2/3 (not in /etc/X11/kb/blah/*.xmodmap)? ok, for this to work, you need these 3 things: 1) an x server with XKB support. xfree/x.org and commercial servers have this. check with CODE xdpyinfo|grep XKEYBOARD I haven't checked with the x servers on the z (xfbdev or something?) but I think I saw someone using the standard debian x.org server... 2) a key with a keysym called Pointer_Button[1-3]. e.g. use CODE xmodmap -e 'keysym F12 = Pointer_Button3' see the xmodmap man page for more 3) MouseKeys turned on. this makes the keys with the Pointer_Button keysyms generate the click event. get Freeware AccessX from http://cita.disability.uiuc.edu/software/a...wareaccessx.php and build, then run CODE ax +mousekeys to turn it on. there's a few other options at http://www.math.missouri.edu/%7Estephen/software/#accessx if you have trouble building that one this all works fine on a debian/i386 system, haven't tried it on the z yet |
|
|
|
Mar 22 2008, 05:38 PM
Post
#14
|
|
|
Group: Members Posts: 124 Joined: 16-January 05 Member No.: 6,248 |
If the X server supports the XKB extension you can use xmodmap to map the mouse buttons onto the keyboard Of course, that's not really useful for a touchscreen! I was distracted by the program to generate click events and forgot about the original idea... This is great for a one-button trackpad (I'm looking at you, MacBook), but for a touchscreen, there's no mouse move, just click and drag, so it only lets you right/middle-click somewhere where you already just left clicked... xbindkeys might do what you want though if you use the press event to change the mapping and the release event to put it back. |
|
|
|
Mar 22 2008, 05:57 PM
Post
#15
|
|
|
Group: Members Posts: 124 Joined: 16-January 05 Member No.: 6,248 |
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd May 2013 - 01:51 AM |