Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Right clicks and context menus

    Reply
    drautzburg | # 1 | 2011-01-05, 01:20 | Report

    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:

    Name:  emelfm2.jpg
Views: 1130
Size:  60.5 KB

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

    Name:  debian.jpg
Views: 1110
Size:  56.4 KB

    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:

    Name:  amarok.jpg
Views: 1096
Size:  51.6 KB


    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    Attached Files
    File Type: tar xbindkeys.tar (10.0 KB, 162 views)
    The Following 2 Users Say Thank You to drautzburg For This Useful Post:
    anthonie, Joseph9560

     
vBulletin® Version 3.8.8
Normal Logout