Active Topics

 



Notices


Reply
Thread Tools
t_moyashi's Avatar
Posts: 49 | Thanked: 102 times | Joined on Jul 2009 @ 驚く為五郎
#1
This simple app enable you to use Right-clicking function like VNCViewer's in anywhere
Right-clicking has been achieved by a long tap.(libgtkstylus.so)
It works well ,but I wanted the function like VNCViewer(in Maemo)'s.
so , I made this app.
While you hold down the FullScreenKey(F6) , your taps become Right-clicks.(you can even drag)
I attached a SCShot of using this app in easy-debian(qvwm).
also, it will work in maemo(ie:KDE.or Ooo).
It may work in mer.

6 steps for testing :
1.download <clickhack1b_F6.tar.gz>
2.open the terminal you like(ie: osso-Xterm)
3.install <xmodmap> from appmanager or "apt-get install xmodmap" as root.
4.unpack "tar xvzf /your/download/dir/clickhack1b_F6.tar.gz"
(ie:tar xvzf /user/home/MyDocs/clickhack1b_F6.tar.gz)
5.run it "/your/download/dir/clickhack1b_F6/clickhack_F6"
(ie:/user/home/MyDocs/clickhack1b_F6/clickhack_F6)
6.if you want to stop using it, just press [Ctrl+C] or run "killall clickhack_F6" in another terminal

>if you want to run it automatically
1.run "mv clickhack1b_F6/clickhack_F6 /yourdebianroot/usr/local/bin/"
2.add "/usr/local/bin/clickhack_F6 &" to startup script (ie : .xinitrc).
3.to be free from longtap function , run "export $GTK_MODULES=''"

Do you think I reinvented the wheel ?

clickhack1b_F6.tar.gz includes :
clickhack1b_F6/
clickhack1b_F6/clickhack1b.c #dirty source code
clickhack1b_F6/clickhack_F6 #main program

Update :
Update1: (10-04-09) clickhack1b: some bugs were fixed(?).
Attached Images
 

Last edited by t_moyashi; 2009-10-04 at 05:22. Reason: Update1
 

The Following 7 Users Say Thank You to t_moyashi For This Useful Post:
debernardis's Avatar
Posts: 2,142 | Thanked: 2,054 times | Joined on Dec 2006 @ Sicily
#2
Unfortunately doesn't work on my tablet, maybe because I run a previous OS (Chinook)?.
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#3
You need xmodmap installed and it also has to be ran as root.
 

The Following 3 Users Say Thank You to qwerty12 For This Useful Post:
Posts: 87 | Thanked: 80 times | Joined on Sep 2009
#4
Originally Posted by qwerty12 View Post
You need xmodmap installed and it also has to be ran as root.
Thanks to t_moyashi for the great job, in order to start the binary automatically at boottime I created this script as /etc/rc2.d/S99clickhack:

Code:
#!/bin/sh

export DISPLAY=:0.0
/usr/local/bin/clickhack_F6 &
Don't forget to make it executable!

The important thing is the export of the DISPLAY-Variable, because otherwise, the program is running in background but it has no effect actually...
 

The Following User Says Thank You to magic_doc For This Useful Post:
Guest | Posts: n/a | Thanked: 0 times | Joined on
#5
Maybe I'm missing something, but this didn't work for me. I downloaded xmodmap from the Lancode.de repository, then followed the instructions in this thread, and while it changed something, it definitely didn't enable right-click. Some widgets wouldn't respond (which they would to a normal left-click), but widgets that had, say, a context menu, behaved like I'd just left-clicked them normally, rather than displaying the menu. (e.g. links in Tear)
Is there something I'm missing? I exported DISPLAY properly, and ran it as root.

Also, is this supposed to disable F6's fullscreen functionality? I didn't see anything explicit in the source to do that, but I've never played around with this sort of stuff. If not, is there a way to do that?
 

The Following User Says Thank You to For This Useful Post:
Posts: 87 | Thanked: 80 times | Joined on Sep 2009
#6
Originally Posted by jaem View Post
Maybe I'm missing something, but this didn't work for me. I downloaded xmodmap from the Lancode.de repository, then followed the instructions in this thread, and while it changed something, it definitely didn't enable right-click. Some widgets wouldn't respond (which they would to a normal left-click), but widgets that had, say, a context menu, behaved like I'd just left-clicked them normally, rather than displaying the menu. (e.g. links in Tear)
Is there something I'm missing? I exported DISPLAY properly, and ran it as root.
ok, I understand- you know that you must hold down the fullscreen button while clicking to achieve a rigth-click?
If it still doesn't work please try this:
Open a terminal and enter:
Code:
xmodmap -pp
You should get an output like this:
Code:
talakara:~# xmodmap -pp
There are 32 pointer buttons defined.

    Physical        Button
     Button          Code
        1              1
        2              2
        3              3
        ...
Then hold down the fullscreen-button while repeating the procedure. The result must be this:

Code:
talakara:~# xmodmap -pp
There are 32 pointer buttons defined.

    Physical        Button
     Button          Code
        1              3
        2              2
        3              1
        ...
This means that the button-code 3 (right click) is on the left button now.
If this doesn't work you can try it with this command:

Code:
xmodmap -e "pointer = 3 2 1"
This change is permanent then, you will always have a right mouseclick!

To undo this just turn it around:

Code:
xmodmap -e "pointer = 1 2 3"
So you can determine if the xmodmap or the clickhack doesn't work properly.

Also, is this supposed to disable F6's fullscreen functionality? I didn't see anything explicit in the source to do that, but I've never played around with this sort of stuff. If not, is there a way to do that?
For me, both functions are working: maemo-apps can be switched to fullscreen when I press the button shortly, when I hold it down I have a right-mouseclick for the gtk-apps.
I must admit that sometimes the right-click stays and I see the behavior you described above. To solve this I just press and release the button one time and everything works again.

HTH & Good luck!

CU Doc
 

The Following User Says Thank You to magic_doc For This Useful Post:
Guest | Posts: n/a | Thanked: 0 times | Joined on
#7
Thanks, but I'd already tried that, and everything checks out. To clarify, does this only work in non-hildonized GTK or Qt apps? On further investigation, it works correctly in the GConf editor app, but not in any other program I have installed, that I've tried so far. Maybe I'm just misunderstanding something.
 
Posts: 87 | Thanked: 80 times | Joined on Sep 2009
#8
Originally Posted by jaem View Post
Thanks, but I'd already tried that, and everything checks out. To clarify, does this only work in non-hildonized GTK or Qt apps? On further investigation, it works correctly in the GConf editor app, but not in any other program I have installed, that I've tried so far. Maybe I'm just misunderstanding something.
Can you tell me an application where it doesn't work?
For me I am using pidgin (not the maemo but the debian-package) and kdepimpi and in both apps the right-click works.

CU Doc
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#9
Off the top of my head, Tear, Maemo RSS Reader, microB (I think)... I tried a whole bunch of apps, but not systematically.
 
Posts: 87 | Thanked: 80 times | Joined on Sep 2009
#10
Originally Posted by jaem View Post
Off the top of my head, Tear, Maemo RSS Reader, microB (I think)... I tried a whole bunch of apps, but not systematically.
Okay, I don't know Tear, I suppose Maemo RSS Reader is the pre-installed one and microB is the standard browser.
For the latter take a look at this:
http://tech.arantius.com/maemo-brows...ec-midori-tear
There you can see that the right-click is relized by holding down the stylus- I think that is the default behavoir with hildon-apps.
Propably there is really a misunderstanding: you search for a right-click-function supported by click_hack where there is none

CU Doc
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:44.