maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   Right clicks and context menus (https://talk.maemo.org/showthread.php?t=67875)

drautzburg 2011-01-05 01:20

Right clicks and context menus
 
4 Attachment(s)
I finally found out how to get right mouse clicks and thus context menus. If there is an easier solution to all this, please let me know. Otherwise - here is how it goes:

You need easyDebian, because this gives you access to xbindkeys and xdotool. Xbindkeys should already be installed. It is what the "Set Debian HW keys" thingy uses. However with xbindkeys alone you can only invoke programs via a keyboard shortcut. What we still need is a program which can send X-events (a right button click). This is what xdotool does. I simply installed it (within debian) via
Code:

apt-get xdotool
and I got:

Code:

ii  xdotool        1:1.20100302.2 simulate X11 keyboard/mouse input
Now you have to tell xbindkeys to call xdotool to send a right button click when some key combination is pressed. I used Qole's .xbindkeysrc.scm and changed some settings (I had to sacrifice the matchbox keyboard). I also added a way to rotate the screen (just for the hell of it).

Anyways, now I can press minus-minus (the little button at the top of my n810) and I get a right-click. This should be independent of gnome or kde. You really get a "genuine" right click.

You can invoke xbindkeys either from maemo (i.e. via Set debian HW keys) or within easyDebian itself. It works on both sides. You have to start xbindkeys separately from maemo and within debian because they use two different xservers. The configuration however is the same.

Here you see the emelfm2 filemanager showing its context menu in maemo:

Attachment 16753

Within debian the pcmanfm also shows its context menu with the same setup.

Attachment 16754

You can even run a remote X11 application and it will still see the right button clicks. Check out amarok running on my desktop machine being displayed on my n810 responding to a right button click:

Attachment 16756


I just hacked this together some minutes ago, and there may still be some quirks. Anyways, I attach my .xbindkeysrc.scm, hope some find this useful.


All times are GMT. The time now is 23:08.

vBulletin® Version 3.8.8