![]() |
Enabling right click with Dbus scripts and proximity sensor
In my quest to enable a real right click (not that press and hold bollocks that is made of constant fail) I have arrived at the conclusion that the optimal way to do this would be to use the rather annoying proximity sensor.
My idea, to enable right click by pressing the proximity sensor. How to achieve this? As far as I can tell the way to do this is with proximityd, a dbus script and xmodmap. That is you turn on right click support (either a button or ties to the launch of particular programs) this enables P.sensor polling by proximityd which in turn reports the condition of the sensor to dbus. dbus scripts then reacts to sensor covered to swap left and right mouse buttons, switch back when sensor uncovered. While this seems strait forward in words I am struggling to see how to monitor for the proximity switch condition change on the dbus. proximityd dbus scripts Any thoughts on how to do this? |
Re: Dbus scripts settings and proximity sensor
Nobody?
Cool, lets all jerk off about how microsoft have *** jacked our beloved nokia some more. Here we have the 'string' from dbus-scripts to match all wlan events: Code:
/some/script * * com.nokia.icd status_changed * WLAN_INFRA Code:
/some/script * * com.nokia.icd status_changed <some network> WLAN_INFRA CONNECTED |
Re: Dbus scripts settings and proximity sensor
Quote:
|
Re: Dbus scripts settings and proximity sensor
Use e.g. the command line tool called dbus-monitor. There might be even better options, but I don't recall currently.
|
Re: Dbus scripts settings and proximity sensor
Not sure if this will help you, but dug up this old post:
http://talk.maemo.org/showpost.php?p=368865&postcount=2 I checked it using cat and is working. But polling on a file value may not be a good idea huh? Something that can be done based on this? BTW, love your idea of right click using proximity sensor! |
Re: Dbus scripts settings and proximity sensor
just done that, used:
dbus-monitor "type='signal' To see the 'open' and close' signals. I am getting closer however I cannot quite see how to piece this together yet. I emailed hopbeat asking if he would consider incorporating such functionality into shortcutd however he simply ignored me. I am surprised nobody has addressed this right click issue before. I mean battle for wesnoth, comix, every friggin text field there is has a r/click context menu that we cannot use! |
Re: Dbus scripts settings and proximity sensor
Quote:
|
Re: Dbus scripts settings and proximity sensor
My problem is this is my first forray into dbus scripts and I am unfamilliar with the nomenclature. The documentation says:
Code:
# First argument is sender /some/script/here * * <proximityd interface> <member> <somthing else> What is the interface name of proximityd? |
Re: Dbus scripts settings and proximity sensor
Ahaah hahaha ha ha!!
Quote:
Code:
/sys/devices/platform/gpio-switch/proximity/state |
Re: Dbus scripts settings and proximity sensor
After some thought it has occoured to me...perhaps I am barking up the wrong bush?
My proposed method involves switching proximity sensor polling on and off in order to run a script at the appropriate time to action a mouse button change. (obviously stopping polling when the system goes to sleep to stop it from not going to sleep). As kitwalker pointed out above qwerty12(R.I.P.) there is already a /sys/ file that reacts to the proximity sensor (probably using a hardware interrupt). The logical way is to use the /sys/ entry but in a way that does not use polling from a script (polling=bad). What about inotify? Do you think it is possible to use a call like: Code:
#!/bin/sh (I am at work so will have to wait till later to test this!) |
All times are GMT. The time now is 05:01. |
vBulletin® Version 3.8.8