maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   [Anounce] [N9] Volume/Power Button Monitor (https://talk.maemo.org/showthread.php?t=82538)

wolke 2012-02-23 20:11

[Anounce] [N9] Volume/Power Button Monitor
 
Add actions to volume/power/proximitySensor from lockscreen, camera, and other apps.

N9 Button Monitor | mt-toggle for n9bm

Highlights:
  • Toggle flashlight/torch from lockscreen
  • Take pictures from lockscreen {quickSnap}
  • Focuses/snaps pix in camera, using VOL+ instead of touch-button
  • Music suite lockscreen controls
  • Take a screenshot {goes into MyDocs}

Features:
  • Run arbitrary commands or certain builtin actions
  • Per-screen actions {do different things in lockscreen, camera, FBReader, mplayer, etc.}
  • Buttons: proximitySensor, volumeUp, volumeDown, cameraBtn {n950}, powerBtn, bluetoothHeadsetButtons
  • Click patterns: single-click, double-click, treble-click, long-click-start, long-click-stop
  • Simple config file, plus an ugly gui for editing it if you really want.
  • Changes are automatically picked up without restart when you edit or use the gui.
  • Optional mt-toggle for turning on/off


Installation:
dpkg --force-depends -i n9-button-monitor_*.deb
#force-depends installs dependencies, like apt-get -f install


https://github.com/teleshoes/n9-button-monitor

config file is located at /home/user/.config/n9-button-monitor.conf
Default Config {this gets created if there is no file}

feel generous?
http://api.flattr.com/button/flattr-badge-large.png {or send money via paypal to elliot.wolk@gmail.com}

wolke 2012-02-23 20:16

Re: [Anounce] [N9] Volume/Power Button Monitor
 
you need to define your own getActions() function.

heres an example that does the camerra hack {vol+ to take pictures in camera app} and play/pauses music using mplayer
Code:

def getActions():
  return [
    Action(volup, cond=appOnTop("camera-ui"),
      action=cmd("xresponse -d 820x240,820x240 -w 1")),

    Action(volup, cond=screenLocked,
      action=cmd(
        "killall mplayer || " +
        "find ~/MyDocs/Music -iname *.mp3 -print0 | " +
        "xargs -0 mplayer"))
  ])


wolke 2012-02-23 20:18

Re: [Anounce] [N9] Volume/Power Button Monitor
 
v0.1
Code:

#!/usr/bin/python
#n9-button-monitor v0.1
#Copyright 2012 Elliot Wolk
#based on:
#####
# Ye Olde Camerra Hack - Another fine Harmattan Hack Powered by Python(tm)!
# 2012-01-12; Thomas Perl <thp.io/about>
#####
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#

from QmSystem import *
from PySide.QtGui import *
from PySide.QtDeclarative import *

import sys
import os
import subprocess
import re

###############
###############
###############
def getActions():
  return ([ None
  , Action(volup, cond=appOnTop("camera-ui"), action=cmd("camera-click"))
  , Action(volup, cond=screenLocked, action=cmd("klomp-cmd pause"))
  , Action(voldn, cond=screenLocked, action=cmd("klomp-cmd next"))
  ])

def readProc(cmdarr):
  out, err = subprocess.Popen(cmdarr, stdout=subprocess.PIPE).communicate()
  return out

def screenLocked():
  return "locked\n" == readProc(['lock', '-g'])
def screenUnlocked():
  return not screenLocked()

def appOnTop(app):
  return lambda: isAppOnTop(app)
def isAppOnTop(app):
  winId = readProc(["xprop", "-root", "_NET_ACTIVE_WINDOW"]) [40:]
  winCmd = readProc(["xprop", "-id", winId, "WM_COMMAND"]) [24:-4]
  return app in winCmd

def cmd(cmd):
  return lambda: runcmd(cmd)
def runcmd(cmd):
  print 'running cmd: "' + cmd + '"'
  subprocess.Popen(['bash', '-c', cmd])
###############
###############
###############

evtPressed = 'pressed'
evtRepeated = 'repeated'
evtReleased = 'released'

stateOn = 2
stateOff = 0

power = 20
volup = 2
voldn = 3

class Action():
  def __init__(self, key, event=evtPressed, action=None, cond=None, stop=True):
    self.key = key
    self.event = event
    self.action = action
    self.cond = cond
    self.stop = stop

keysPressed = set()
actions = getActions()

def keyEvent(key, state):
  event = None
  if state == stateOn:
    if key not in keysPressed:
      event = evtPressed
    else:
      event = evtRepeated
  elif state == stateOff:
    event = evtReleased

  if state == stateOn:
    keysPressed.add(key)
  elif state == stateOff:
    keysPressed.discard(key)

  for action in actions:
    if action != None and action.key == key and action.event == event:
      if action.cond == None or action.cond():
        action.action()
        if action.stop:
          return

def main():
  app = QApplication(sys.argv)
  keys = QmKeys()
  keys.keyEvent.connect(keyEvent)
  app.exec_()

if __name__ == "__main__":
  sys.exit(main())


wolke 2012-02-23 20:22

Re: [Anounce] [N9] Volume/Power Button Monitor
 
i put the above script in /usr/bin/n9-button-monitor, chmod +x.

i run it on startup with upstart.

/etc/init/n9-button-monitor.conf
Code:

# Description of the script, mandatory
description "Startup script for n9-button-monitor"

# Author e-mail address, mandatory
author "elliot.wolk@gmail.com"

start on filesystem or runlevel [2345]
stop on runlevel [!2345]

#none: stdout to /dev/null
#output: direct stdout to console
console output

#if application exits, restart max 3 times within 300 secs
respawn
#respawn limit 3 300

exec /usr/bin/aegis-exec -s -u user bash -c 'DISPLAY=:0 n9-button-monitor'


aRTee 2012-02-24 09:21

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Thanks for sharing, I have to think on how I can used this for my wife's N9.

F2thaK 2012-02-24 10:02

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Cool!

Any aims for this? GUI maybe?

wolke 2012-02-24 18:45

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by F2thaK (Post 1169137)
Cool!

Any aims for this? GUI maybe?

the next things i plan on doing are
1) investigating consuming button presses, overriding the default button actions like zooming/volume when an action is defined in the script. {or maybe just overriding it period in all cases, and simulating all the actually useful ones with actions in the script}

2) making the volume keep the phone's ringer volume and speaker volume in lockstep. so many times ive turned down the vol only to have loud music blast out of it. what id do is make it so that every time you press a volume button, ill get the ringer volume and set the phone volume to some variation on that.

3) separating out the action configuration from the script, so you dont need to be a python developer to use it. i imagine a simple rc file a la
~/.n9-button-monitor
[volume-up-press]
screen_lock = start_music
camera_on_top = snap_picture

[volume-up-release]
always = sync_volume

i would need to find out what people would even want to use this for, and add all of them to the rc-file grammar.

4) implement state for macro-ish controls
e.g.: make it so pressing and holding volume up, and then pressing volume down, and then releasing volume down and then releasing volume up, turned on the flashlight for 20 seconds

"UP DOWN down up" => "flashlight on; sleep 20; flashlight off"

{i think im going to rename the vol+/vol- keys INC and DEC to avoid confusion with button-up and button-down for keypresses.}

wolke 2012-02-24 18:51

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by aRTee (Post 1169130)
Thanks for sharing, I have to think on how I can used this for my wife's N9.

please please share when you do. im dying for things for this to actually do. so far:

1) play/pause/skip/prev music players on the lock-screen
2) flashlight on/off on the lock-screen
3) camera take picture {and maybe focus first}
4) camera take delayed picture
5) answer calls, instead of swiping up

1, 3, and 4 are easy and done. the camera doesnt focus first though, so what id REALLY like to do is make it so volUp-PRESS focuses, and volUp-RELEASE snaps. i dont think i have enough control to do this, though.

if anybody thinks of anything even remotely awesome, please post.

wolke 2012-03-27 01:58

Re: [Anounce] [N9] Volume/Power Button Monitor
 
i got torch/flashlight toggling to work from the lowpowerscreen.

Arie 2012-03-27 02:00

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by wolke (Post 1184473)
i got torch/flashlight toggling to work from the lowpowerscreen.

This is becoming pretty cool.

wolke 2012-03-27 02:03

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by Arie (Post 1184474)
This is becoming pretty cool.

:D see first post for the update

Arie 2012-03-27 02:08

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by wolke (Post 1184475)
:D see first post for the update

Where does it talk about the flashlight function?

wolke 2012-03-27 02:09

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by Arie (Post 1184476)
Where does it talk about the flashlight function?

check again, sry

wolke 2012-03-27 02:11

Re: [Anounce] [N9] Volume/Power Button Monitor
 
the relevant line in the code is:

, Action([voldn, volup, volup], cond=screenLocked, action=torch.toggle)

i.e.: press and hold volume down, double-tap volume up, and torch is toggled

a_petrov303 2012-03-27 07:45

Re: [Anounce] [N9] Volume/Power Button Monitor
 
this is great!

thank you for sharing!

could anyone (if the author is focused on more principal things) write a tutorial or how-to use this finding?

I understand the potential of the script, but don't really know how to use it. shall I just write everything in the terminal? please help, as the default buttons are just useless!!!

many thanks for your work!

biatch0 2012-03-27 15:34

Re: [Anounce] [N9] Volume/Power Button Monitor
 
What would be cool is pressing and holding button X

1) unlock
2) launch camera
3) focus
4) snap a photo

Similar to how the hardware camera button on the Lumia 800 functions.

wolke 2012-03-27 16:52

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by a_petrov303 (Post 1184538)
this is great!

thank you for sharing!

could anyone (if the author is focused on more principal things) write a tutorial or how-to use this finding?

I understand the potential of the script, but don't really know how to use it. shall I just write everything in the terminal? please help, as the default buttons are just useless!!!

many thanks for your work!

yea, sry, this is more of a do-it-yourself toolbox for making an app than an app.

ill see if i can put together something you can just run from the terminal and have it work.

some questions first {anyone else, feel free to chime in}:

1)
which of these sounds better for the flashlight/torch on lowpower lock screen?
a) vol+ toggles the torch
b) vol+ will toggle the flashlight {it will turn off after 30s}
c) press and hold vol+ to turn on the flash, release to turn it off
d) press and hold vol+, double-tap vol-, release vol+, to toggle the flash {this makes it more or less impossible to pocket-flash}

2)
i dont know if anyone else cares about the music play/pause/skip/prev, but to me thats the vital feature. how should this work/not work?

3)
also, should it simulate thomas perl's camerra hack? {vol+ to take picture when in camera mode} ive found that i like it.

4)
does anyone care about 10s delayed picture? its more or less impossible to take a good picture without holding the n9 anyway, so it seems fairly useless to me so far.

wolke 2012-03-27 17:03

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by biatch0 (Post 1184703)
What would be cool is pressing and holding button X

1) unlock
2) launch camera
3) focus
4) snap a photo

Similar to how the hardware camera button on the Lumia 800 functions.

so i dont know how the lumia 800 does this. i assume that you want to do this while inside the camera app; press and hold vol+, wait 1s for it to focus, release to snap picture.

totally feasible, except for the focusing bit. the built-in camera doesnt expose any way to forcibly make it focus {that i know about}. one could easily just write another camera application for doing this with qt mobility, but it wouldnt be as full-featured or polished.

wolke 2012-03-27 17:03

Re: [Anounce] [N9] Volume/Power Button Monitor
 
one thing ive been thinking about is simply snapping pictures from the lock screen, with no viewfinder. extremely often i find that im not quick enough to unlock my phone, open up the camera app, and actually snap one off before the phenomenon im trying to capture stops.

the way i imagine this would work is to press and hold vol+ from the lock screen, and then tap vol- repeatedly to snap off pix. i would use the qtmobility framework for this, too, which i havent tested. it seems that it borrows the settings from the camera app already, which should be convenient.

does this sound useful to anybody?

alephito 2012-03-27 19:13

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Yes, I would like to have that option.

Mada22009 2012-03-27 19:38

Re: [Anounce] [N9] Volume/Power Button Monitor
 
this is really getting interesting
i think it would be in perfect order if:
1-long press on power button when on stand by turns on flash light and off when short press after that
2-short press on power button unlocks the device.
3- when camera is opened use power button for shooting with focus
4- when player is opened power button for pause and resume and volume button + for next track when short pressed and forward when long pressed, volume button - previous track when short pressed and rewind when long pressed.

guess for the camera shooting from stand by screen it could be double press on power button or something ?

if we could all agree on a pattern for the buttons then a dep file could be made with that pattern code and uploaded to the store so all N9 users could enjoy it and even for profit to who ever would like to make it :)

biatch0 2012-03-27 21:46

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by wolke (Post 1184738)
so i dont know how the lumia 800 does this. i assume that you want to do this while inside the camera app; press and hold vol+, wait 1s for it to focus, release to snap picture.

totally feasible, except for the focusing bit. the built-in camera doesnt expose any way to forcibly make it focus {that i know about}. one could easily just write another camera application for doing this with qt mobility, but it wouldnt be as full-featured or polished.

The useful portion would be pressing button X and getting the device to unlock AND launch the camera app. From that point on, using something like the Vol+ as Camera button app would work (or your existing code).

The entire idea revolves around one handed operation... while cycling in my case. Trying to find the shutter button on screen, holding it down, and waiting for it to focus before releasing tends to be very difficult :D

wolke 2012-03-27 22:09

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by biatch0 (Post 1184864)
The useful portion would be pressing button X and getting the device to unlock AND launch the camera app. From that point on, using something like the Vol+ as Camera button app would work (or your existing code).

The entire idea revolves around one handed operation... while cycling in my case. Trying to find the shutter button on screen, holding it down, and waiting for it to focus before releasing tends to be very difficult :D

oh thats easy as pie. ill add that to the list of hard-coded actions you can change in the config file, when {and if} i actually make this into a gui-configged app.

wolke 2012-03-28 00:07

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by Mada22009 (Post 1184800)
this is really getting interesting
i think it would be in perfect order if:
1-long press on power button when on stand by turns on flash light and off when short press after that
2-short press on power button unlocks the device.
3- when camera is opened use power button for shooting with focus
4- when player is opened power button for pause and resume and volume button + for next track when short pressed and forward when long pressed, volume button - previous track when short pressed and rewind when long pressed.

guess for the camera shooting from stand by screen it could be double press on power button or something ?

if we could all agree on a pattern for the buttons then a dep file could be made with that pattern code and uploaded to the store so all N9 users could enjoy it and even for profit to who ever would like to make it :)

in order for the power button to do all these things, it would need to not lock/unlock the screen. i personally like its single-naturedness and am fine using vol+/- for everything.

also, i really wanna know what buttons people want, but no consensus need be reached; it should be configurable {preferably without coding}.

Rusnak-COBRA 2012-03-28 13:01

Re: [Anounce] [N9] Volume/Power Button Monitor
 
I would suggest:
1 - c) press and hold vol+ to turn on the flash, release to turn it off
2 - double tap on + to next, double tap on - for previous. press both together for pause (is it possible? physically yes)
4 - camerra hack is extremely slow for me to use, really. need to find out something more quick. toggling camera from lockscreen is a good ideal

HtheB 2012-03-28 14:44

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Can you also change the Vol up and the Vol down button to force the volume instead of changing the profile?

It's very annoying, see this bug what I mean:
http://forum.meego.com/showthread.php?t=5202
https://harmattan-bugs.nokia.com/show_bug.cgi?id=210

late88 2012-03-28 15:21

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by Rusnak-COBRA (Post 1185097)
I would suggest:
1 - c) press and hold vol+ to turn on the flash, release to turn it off
2 - double tap on + to next, double tap on - for previous. press both together for pause (is it possible? physically yes)
4 - camerra hack is extremely slow for me to use, really. need to find out something more quick. toggling camera from lockscreen is a good ideal

My suggest:

1. exactly like yours, the best option for flashlight imo
2. Agreed too. Double tap vol+/- next/prev sounds good, but pause... it's hard to push both exactly same time. If not possible, its ok. i rarely use the pause option and it isn't so bad to do it on the usual way.
3. hold down vol- for camera use. possibility to open camera app, focus and take a picture.

Of course the best option would be possibility to choose by yourself one command for one action with UI.
Like this:

A. flashlight: choose option (1.long press vol+-, 2.double press vol,3.... etc)

B. next/previous track: 1...2...3.

Rusnak-COBRA 2012-03-28 15:29

Re: [Anounce] [N9] Volume/Power Button Monitor
 
have you tried to push both buttons at once? :) I am doing it right now, it is not a problem.

late88 2012-03-28 15:34

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by Rusnak-COBRA (Post 1185145)
have you tried to push both buttons at once? :) I am doing it right now, it is not a problem.

It depens how responsive it is. (delay) if you don't have to push exactly the same time, its ok for me.

wolke 2012-03-28 15:51

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by Rusnak-COBRA (Post 1185145)
have you tried to push both buttons at once? :) I am doing it right now, it is not a problem.

yea, but try doing it while driving/jogging/etc. for me, play/pause and skip are the two most important features.

wolke 2012-03-30 19:50

Re: [Anounce] [N9] Volume/Power Button Monitor
 
ok, so here is my plan for the next release, based on the enormously helpful feedback and my own experiments.
this will be the first one that will work out of the box {maybe just for inception-users and open-moders, but ill do my best to make it work for anybody that can use a terminal and follow instructions in it once}.

goals:
1) make installation easy, with an incept-able or just straight up installable deb. apply for ovi store, etc.

2) move the button config to a file {e.g.: /home/user/.config/button-monitor/keys.conf}. it will be configurable live at runtime.

3) make the buttons you can configure reasonable. there will be 5 events per button.
{for now, just volume up, and volume down; power down is right out, until i work out how to both disable the default action, and ensure that you can still shut down the phone and lock it safely. also out are multi-button combinations, because i think they are too hard to do usefully, and complicate the detection of patterns; in my tests, i wound up doing things i didnt mean most of the time.}

(a) press-and-hold-start
(b) press-and-hold-release
(c) click
(d) double-click
(e) treble-click

for example:
-press-hold-start VOL+ might focus the camera, and press-and-hold-release VOL+ take the picture
-press-hold-start VOL- might turn on the flash, and press-and-hold-release VOL- turn it back off
-click VOL+ would play/pause music, double-click VOL+ would next song, and treble-click VOL+ would prev song

4) add some actions
(a) flash on, with configurable auto-shutoff {ready}
(b) flash off {ready}
(c) snap picture inside the camera program {ready}
(d) focus camera inside the camera program {ready}
(e) snap picture without camera program {possible, but nowhere near ready, not essential for next release}
(f) volume control, not ****ing profile {havent explored it yet, i think this is critical and should be simple}
(h) play/pause music {i use magic perl scripts + mplayer, so not done yet for anybody but me}
(i) skip song {ditto}
(j) prev song {ditto}

5) add some conditions. you can specify a list of them.
(a) lock screen is on/off {ready}
(b) low power screen is on/off {ready}
(c) phone is/is not in-pocket screen-off {might be impossible; PLEASE LET ME KNOW IF YOU KNOW HOW TO DO THIS there are no mce dbus messages for it, anyway, and the brightness device doesnt stop reading 0 in lowpowerscreen}
(d) camera program has focus {ready}
(e) generic program is on top {ready, but you need to know the window name; camera is camera-ui, firefox is fennec, etc}

ill put the features in a wiki or list or something, and post when theyre done

wolke 2012-03-30 23:47

Re: [Anounce] [N9] Volume/Power Button Monitor
 
features im adding:
https://teleshoes.tadalist.com/lists/2175153/public

this is to show that progress is just slow, not dead; im on my way to making something useful.

complain here and ill see it. propose any actions or conditions you may think of here, and ill add them if they make sense.

HtheB 2012-03-31 03:08

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by wolke (Post 1186291)
features im adding:
https://teleshoes.tadalist.com/lists/2175153/public

this is to show that progress is just slow, not dead; im on my way to making something useful.

complain here and ill see it. propose any actions or conditions you may think of here, and ill add them if they make sense.

Great!
From the todo list:
action: volumeUp {not profile}
action: volumeDown {not profile}

Please put this one the highest priority on the list.. :(
You will make A LOT of users happy with this very functional option!

wolke 2012-03-31 03:48

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by HtheB (Post 1186331)
Great!
From the todo list:
action: volumeUp {not profile}
action: volumeDown {not profile}

Please put this one the highest priority on the list.. :(
You will make A LOT of users happy with this very functional option!

unfortunately, it wont be terribly easy; i need to SELECTIVELY disable the default actions, and figure out under what circumstances to allow them.

however, i dreamt up a compromise; sync the profile to the volume after each press.
SILENT => 0%
BEEP => 0%
RINGING_1 => 25%
RINGING_2 => 50%
RINGING_3 => 75%
RINGING_4 => 100%

lemme know if you think this makes sense as a compromise if actually selectively disabling default actions {like zoom in the browser, zoom in the camera, etc} is hard or even impossible.

HtheB 2012-03-31 05:34

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by wolke (Post 1186334)
unfortunately, it wont be terribly easy; i need to SELECTIVELY disable the default actions, and figure out under what circumstances to allow them.

however, i dreamt up a compromise; sync the profile to the volume after each press.
SILENT => 0%
BEEP => 0%
RINGING_1 => 25%
RINGING_2 => 50%
RINGING_3 => 75%
RINGING_4 => 100%

lemme know if you think this makes sense as a compromise if actually selectively disabling default actions {like zoom in the browser, zoom in the camera, etc} is hard or even impossible.


Hmmm... You could try that as a workaround for now.
I only want a vibrate profile though. I think I might have a solution for that:
I will make a special ringtone that is silent, but it will vibrate longer by default (because if you set the ringtone on "(no sound)" it will only vibrate very short).

About zooming on browser: Pinch to zoom
About camera zooming: on the camera app, there is a slider at the top, you can slide that to zoom in or to zoom out.

so the Volume button is only meant for the Volume! (and to boot NITDroid :p )

wolke 2012-03-31 16:40

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by HtheB (Post 1186348)
Hmmm... You could try that as a workaround for now.
I only want a vibrate profile though. I think I might have a solution for that:
I will make a special ringtone that is silent, but it will vibrate longer by default (because if you set the ringtone on "(no sound)" it will only vibrate very short).

About zooming on browser: Pinch to zoom
About camera zooming: on the camera app, there is a slider at the top, you can slide that to zoom in or to zoom out.

so the Volume button is only meant for the Volume! (and to boot NITDroid :p )

i am toootally inclined to agree; everywhere its used in default apps is stupid and redundant. the volume buttons CAN have real uses though, in other apps, and those apps will probably not expose a way to trigger them. see fbreader's volume-to-turn-page, and any app that decides to make something you can ONLY do with volume keys,

until i find a way to not eat the events under certain circumstances, i cant really make this feature work.

HtheB 2012-03-31 18:13

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Quote:

Originally Posted by wolke (Post 1186529)
i am toootally inclined to agree; everywhere its used in default apps is stupid and redundant. the volume buttons CAN have real uses though, in other apps, and those apps will probably not expose a way to trigger them. see fbreader's volume-to-turn-page, and any app that decides to make something you can ONLY do with volume keys,

until i find a way to not eat the events under certain circumstances, i cant really make this feature work.

You can at least make some "option" to enable "volume only" for users like me :D

wolke 2012-04-01 05:52

Re: [Anounce] [N9] Volume/Power Button Monitor
 
0.3 should actually work, full of bugs, but otherwise pretty much exactly as advertised, if youre terminal savvy enough to get it working. {if you have any trouble installing it, ill try to help; ask here or on irc}

key features are missing, like music-control and HtheB-style-volume-control, and its a ***** to install and run because it needs super-privileges.

also, i just got it working so its not especially well-tested. it seems to use no power at all when idle, which is my #1 priority in terms of regression testing. if you get it working, and notice power usage increases, PLEASE TELL ME.

wolke 2012-04-02 17:55

Re: [Anounce] [N9] Volume/Power Button Monitor
 
0.4 => music suite actions

action=musicPlayPause,volumeUp,singleClick,screenL ocked
action=musicNext,volumeDown,singleClick,screenLock ed
action=musicPrev,volumeDown,doubleClick,screenLock ed

wolke 2012-04-02 18:01

Re: [Anounce] [N9] Volume/Power Button Monitor
 
I CANT FIGURE OUT HOW TO CHANGE THE GODDAM SYSTEM VOLUME.

tried with built-in clis:
pulseaudio-utils, alsamixer, amixer

tried with c libraries and all audio APIs i found in the developer api:
qmediaplayer, phonon.audiooutput.

this should SO not be difficult. anybody know how to do this? {programmatically adjust the system volume, such that the slider in the status bar also moves with it}


All times are GMT. The time now is 09:12.

vBulletin® Version 3.8.8