On Sun, 2014-03-02 at 13:31 +0000, robin wrote: > Hi, > > I would like to be able to access some programs in qtmoko faster, so my > question is: Is there either a way to > > to run an app directly when you press the aux button > > and if so, how can I distinguish the length of a press (I know that the > old android version did start three different processes depending on the > length of time you pressed the power button (very short, ~2sec, ~4secs). > > and if this is all not possible, could someone point me to where I should > start reading to be able to change/extend the homescreen, to add any icon > with a call of that application I want to run. > > and even more advanced is there any chance of bind the this process somehow > to a single icon: > -> Application -> QX -> Select Navit -> Click upArrow in Menu -> Click Launch > > many thanks, > > robin > > > _______________________________________________ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community
Hi Robin, The Aux button will generate an interrupt when pressed or released. if you look at /proc/interrupts and find the line starting with "50:", you can see the number increase, every time you press the aux button. You could build a script that reads /proc/interrupts, and start another script to launch you application. There is however no way to distinguish between a "normal" press and one to launch your app. You can use a simple timing loop to check how long the aux key is held, and only start your application when aux is pressed for more then x seconds. Kind regards, Ed _______________________________________________ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community