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-05-05 20:05

Re: [Anounce] [N9] Volume/Power Button Monitor
 
thx for the quicksnap input {the more feedback now, the better, cause once i actually code this up, it will be hard to get your two cents in}

i dont know how to detect 'jackstick is plugged in', and, in my opinion, its a low-priority thing compared with totally disabling the volume buttons {which would be the best solution, again just in my opinion}.

im pretty ticked off that the volume keys work in the lockscreen to begin with; i think its a dirty-urty trick that nokia preemptively played on me particularly, in the future-past.

my recommendations are to either/both:
1) remove the music actions
2) change the volume from the status bar after unlocking it

i mean, i generally adjust the volume once and use an equalizer to make sure my ear drums dont get blasted. i then routinely skip through songs, and play/pause, waaay more often than id ever want to adjust the volume. this is me personally, tho, and my music player doesnt have volume-key-controls. {so for me, my buttons just skip my music without messing with the volume}

rexii23 2012-05-06 11:17

Re: [Anounce] [N9] Volume/Power Button Monitor
 
For quick snap I would personally prefer a config file. click, double-click, treble-click could be messy when trying to snap a pic ASAP. I would love to have the option of disabling the AF light too. It blinds my cats and I have missed some great shots.

wolke 2012-05-06 17:13

Re: [Anounce] [N9] Volume/Power Button Monitor
 
heh, i dont know how to do that, even with the regular camera. i cover the bulb with my finger when focusing.

wolke 2012-05-09 16:26

Re: [Anounce] [N9] Volume/Power Button Monitor
 
{100 downloads on github. yay!}

guillermorojaz 2012-05-26 09:18

Re: [Anounce] [N9] Volume/Power Button Monitor
 
1 Attachment(s)
Greetings.
Great job, man.
In my case I just want to have the torch as a function.
Edit config.py to keep it with that configuration.
I would like to know how one could do to also be on the desktop.
action=torchToggle,volumeUp,SingleClick, screenLocked and desktop\n"
It is possible that the action of the volume keys is both the screelocker and the desktop?
Thanks in advance.

wolke 2012-05-26 16:06

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

Originally Posted by guillermorojaz (Post 1212768)
Greetings.
Great job, man.
In my case I just want to have the torch as a function.
Edit config.py to keep it with that configuration.
I would like to know how one could do to also be on the desktop.
action=torchToggle,volumeUp,SingleClick, screenLocked and desktop\n"
It is possible that the action of the volume keys is both the screelocker and the desktop?
Thanks in advance.

for disjunction, simply add two identical actions, one with
cond=appOnTop("first-place-it-should-work")
and one with
cond=appOnTop("second-place-it-should-work")

i forget what the 'desktop' screen is called {you want the title property of the window for it}.

beware! what you want is probably not possible, because the default action {i.e. changing the volume} WILL happen no matter what other actions you do. im working on this, not sure its possible yet.

guillermorojaz 2012-05-26 20:54

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

Originally Posted by wolke (Post 1212911)
for disjunction, simply add two identical actions, one with
cond=appOnTop("first-place-it-should-work")
and one with
cond=appOnTop("second-place-it-should-work")

i forget what the 'desktop' screen is called {you want the title property of the window for it}.

beware! what you want is probably not possible, because the default action {i.e. changing the volume} WILL happen no matter what other actions you do. im working on this, not sure its possible yet.

Thanks for responding.

I want to say that as you have seen in the config.py let it set for 5 min. works perfect.
Turns the flash with any of the keys vol.
A small detail. while turning the key flash vol, and then unlock the screen, vol keys stop working;

- On Call does not increase or decrease the volume.
- In desktop profile does not change.
- In the camera, not opening. (Camera does not respond, restart If the problem persists).

Only panpalla relock, click on vol. and ready.

I mention it so you know what happens with these settings.

I actually think it's perfect.

It is an excellent work.

wolke 2012-05-27 06:42

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

Originally Posted by guillermorojaz (Post 1213007)
Thanks for responding.

Turns the flash with any of the keys vol.

- On Call does not increase or decrease the volume.
- In desktop profile does not change.
- In the camera, not opening. (Camera does not respond, restart If the problem persists).

i noticed in the config.py, the only changes you made were to the default config; you should instead make your own ini file.

the ini file goes at /home/user/.config/n9-button-monitor.ini
you should simply put this there, and use the deb file as it is:
Code:

torchAutoShutOffTimeMs=300000
longClickDelayMs=400
doubleClickDelayMs=400
trebleClickDelayMs=600
action=torchToggle,volumeUp,singleClick,screenLocked
action=torchToggle,volumeDown,singleClick,screenLocked

{do what you like, modifying the source to be how you want is what the gpl is all about. what im suggesting is better if you want to just change the config, though. you can change the ini at runtime without restarting, and you dont invalidate the deb files in aegis.}



now, as for your keys not changing the volume or the profile, i have no idea how you achievd this, but i would really like to know! do you use inception? do you run the program as root? are you on openmode? {if youre not, you could brick your phone by modifying the source files without updating the digsigsums. perhaps this is also causing your camera troubles.}

Storm_11 2012-05-27 07:32

Re: [Anounce] [N9] Volume/Power Button Monitor
 
one big idea that is on android roms that could be useful with this application is using volume buttons to move cursor in text. for example, up moves the arrow right and down moves cursor left. will make the lack of hwkb easier for those of us who dont use swype.

guillermorojaz 2012-05-27 07:45

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

Originally Posted by wolke (Post 1213140)
{do what you like, modifying the source to be how you want is what the gpl is all about. what im suggesting is better if you want to just change the config, though. you can change the ini at runtime without restarting, and you dont invalidate the deb files in aegis.}


now, as for your keys not changing the volume or the profile, i have no idea how you achievd this, but i would really like to know! do you use inception? do you run the program as root? are you on openmode? {if youre not, you could brick your phone by modifying the source files without updating the digsigsums. perhaps this is also causing your camera troubles.}

Hi.
If openmode.
As I mentioned before,
When you start the flash key vol->unlock screen->phone call->volume keys do not work.
When you start the flash key vol->unlock screen->desktop->volume keys do not change the profile.
Screen lock->keys vol->flash off->returns to normal.


The error in the camera is simply the flash on, try any app (theflashlight), is the same.

I imagine the mistakes mentioned above is due to start the flash and then try to give use volume keys while the flash is on.

You can disable the flash function to unlock screen?

locked screen->key vol->flash on->unlock screen->flash off.

guillermorojaz 2012-05-27 08:13

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

Originally Posted by Storm_11 (Post 1213153)
one big idea that is on android roms that could be useful with this application is using volume buttons to move cursor in text. for example, up moves the arrow right and down moves cursor left. will make the lack of hwkb easier for those of us who dont use swype.

It would be helpful.

ladoga 2012-07-15 12:45

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

Originally Posted by wolke (Post 1201382)
again, an oversight on my part because i dont use the built-in music app. AAAARGH, this is so annoying. i guess i just have to work on disabling the buttons, which means writing quite a bit of c++.

also means i cant develop it without a computer because ****ING NOKIA DOESNT RELEASE ALL THE DEV SOURCE PACKAGES IN THE DEV REPO.

just so you know, a good deal of the development for this was done on the phone while riding the train, with a btkb. HATE HATE HATE HATE HATE

We could just add those -dev packages into community repository, no?

[edit] btw. how would I start a camera app from the stand-by screen using the button monitor? I'm interested in long tap on vol-up key unlocking the phone and launching the app.

redgael 2012-07-15 14:25

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Hello, how to throw the flashlight by double pressing power button ?

late88 2012-07-15 14:53

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

Originally Posted by redgael (Post 1237797)
Hello, how to throw the flashlight by double pressing power button ?

After closer look I think it's impossible at the moment. Why not double press volume keys? Or long press volume up --> flash ON release --> flash OFF.

It works from the low power mode.

ssciberras 2012-07-15 15:10

Re: [Anounce] [N9] Volume/Power Button Monitor
 
how do u use the program? I have run the gui, do you have to run anythibg else in terminal?

Dousan 2012-07-15 15:21

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

Originally Posted by ssciberras (Post 1237805)
how do u use the program? I have run the gui, do you have to run anythibg else in terminal?

When in the gui press 'load default config' and it show in the boxes. Make your changes if any and press 'save config file' and if you don't make any also press 'save config file'. That should work atleast it did for me.

Regards Dousan...

redgael 2012-07-15 17:13

Re: [Anounce] [N9] Volume/Power Button Monitor
 
I have not included all :s

flopjoke 2012-07-15 17:35

Re: [Anounce] [N9] Volume/Power Button Monitor
 
this is a very useful app thingy. Yeah, the GUI may be ugly, but whether that's fixed or not, it still is very handy. Especially the torch part.

wolke 2012-07-16 00:52

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

Originally Posted by flopjoke (Post 1237853)
this is a very useful app thingy. Yeah, the GUI may be ugly, but whether that's fixed or not, it still is very handy. Especially the torch part.

glad you like it!

i dont use the gui myself, i made it for the terminal-wary. literally all it does is edit a text a file.

wolke 2012-07-16 01:04

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

Originally Posted by ladoga (Post 1237777)
We could just add those -dev packages into community repository, no?

[edit] btw. how would I start a camera app from the stand-by screen using the button monitor? I'm interested in long tap on vol-up key unlocking the phone and launching the app.

the development headers need to be repackaged by someone with a lot of time, and experience managing these things.


unlocking the phone when you press a volume key is quite tricky. starting the camera app is trivial.

you need to make a script that can be run as user that unlocks the phone.


this will start the camera, but doesnt unlock it:
action=cmd(camera-ui),volumeUp,longClickStart,screenLocked

wolke 2012-07-17 18:22

Re: [Anounce] [N9] Volume/Power Button Monitor
 
200 downloads!
1 donations!
;)

wolke 2012-07-18 22:19

Re: [Anounce] [N9] Volume/Power Button Monitor
 
anyone know if it works on pr1.3?

Kabouik 2012-07-18 22:38

Re: [Anounce] [N9] Volume/Power Button Monitor
 
It does, I'm using it, and it's great. Thanks for this Wolke. :)

I've added an action for opening the dialer when double pressing the Vol + button when the device is locked. Together with the tweak (from N9 Qtweak) to unlock the device by double pressing the power button. It's really handy: when you have to call someone but are not currently using the phone, two double-press actions while picking up the phone in your pocket, and you have the application in focus, ready to use for dialing a number or browsing a contact.

Dousan 2012-07-19 11:57

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

Originally Posted by wolke (Post 1239481)
anyone know if it works on pr1.3?

Also using it on a freshly fully flashed PR1.3 and working as it should :)

Regards Douan...

wolke 2012-07-21 07:06

Re: [Anounce] [N9] Volume/Power Button Monitor
 
300 downloads!!
1 donations!!

wolke 2012-08-24 18:15

Re: [Anounce] [N9] Volume/Power Button Monitor
 
400 downloads!!!
1 donations!

noetus 2012-08-26 17:23

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Hey, this is great! I've read through the thread and I have the default config saved, but there are extra actions I'd like to configure. It seems people have already implemented these but I'm not certain how to do it. Basically (1) unlock and open the phone app; (2) unlock and open the camera app. The actions are not in the standard list so how do I get them configured?

Will donate once I have this all set up as required. Also like the idea of being able to move the cursor using the volume keys when in text editing mode.

danested 2012-08-26 18:30

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

Originally Posted by wolke (Post 1255355)
400 downloads!!!
1 donations!

Havent downloaded it yet, but if you want to be paid for ypur work then i suggest u put this on the store and give that link here. Also makes more sense because all countries dont have paypal, but Nokia can work around this as they have more payment options.... Like pay via phone bill...

wolke 2012-08-27 14:54

Re: [Anounce] [N9] Volume/Power Button Monitor
 
1 Attachment(s)
Quote:

Originally Posted by noetus (Post 1255942)
Hey, this is great! I've read through the thread and I have the default config saved, but there are extra actions I'd like to configure. It seems people have already implemented these but I'm not certain how to do it. Basically (1) unlock and open the phone app; (2) unlock and open the camera app. The actions are not in the standard list so how do I get them configured?

Will donate once I have this all set up as required. Also like the idea of being able to move the cursor using the volume keys when in text editing mode.

you can run any shell command. this means you can do literally anything that you can figure out how to do in a terminal; what those things are and how to do them are outside the scope of this app.

locking/unlocking the screen with a command is trivial {in openmode; probably also trivial with inception; maybe not in closed mode}. i have a script {attached} that i use for it. try it out!
if you can get it to lock/unlock in ssh, you can get it to work in n9-button-monitor.

wolke 2012-08-27 17:55

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

Originally Posted by danested (Post 1255956)
if you want to be paid for ypur work then i suggest u put this on the store and give that link here

thanks for the tip danested, but im not sure i can put this app in the store. it interferes with {sucky} harmattan functionality, like zooming in the camera with the volume buttons. also, i dont like the store because of stupid harmful policies like the 5 download limit, and the lack of friendliness to free software {no sorting by license, no spot to even ENTER a license}.


while i was vaguely hoping the 8 or 9 people who said theyd pay me for a gui would accept the shitty gui i made and give me a free sandwich, i made this app for me, not for $$. {thanks again to the generous donor!}

if theres someone out there who really wants to give me money and cant use flattr for some reason, let me know and ill see what i can do! {flattr's pretty cool, btw: https://flattr.com/register}

wout.martens 2012-08-27 21:08

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Is it just me but is this app consuming quite some battery during standby?

wolke 2012-08-27 21:37

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

Originally Posted by wout.martens (Post 1256452)
Is it just me but is this app consuming quite some battery during standby?

i idle at about 6 mA with and without n9-button-monitor. ive tested it numerous times, under many different circumstances.

what numbers are you getting? if you dont have numbers, heres a good test:
1) install lpsmagic
2) uninstall n9-button-monitor completely {apt-get purge n9-button-monitor}
3) reboot
4) without doing anything else, lock the phone and observe the battery usage every 2 minutes over the course of 10 minutes
5) install n9-button-monitor
6) reboot
7) without doing anything else, lock the phone and observe the battery usage every 2 minutes over the course of 10 minutes

i get the same numbers for 4) and 7) in openmode on pr1.3, namely 6 mA average, with a high of 13 mA and a low of 4 mA.

wolke 2012-09-17 22:10

Re: [Anounce] [N9] Volume/Power Button Monitor
 
500 downloads!
2 very generous donations!

wolke 2012-10-19 21:54

Re: [Anounce] [N9] Volume/Power Button Monitor
 
600 downloads!
2 donations!

flopjoke 2012-10-19 22:17

Re: [Anounce] [N9] Volume/Power Button Monitor
 
The toggle flashlight with volume keys is probably the most used thingy on my N9 now. It doesn't require you to open an app all the time or stuff like that.. just blended perfectly with the OS - really amazing stuff.. thanks!

Question - will this app ever have a proper GUI for settings?

wolke 2012-10-19 23:48

Re: [Anounce] [N9] Volume/Power Button Monitor
 
very glad to hear it!

ahhahahha, i know the gui is ugly and unusable.
there is a good reason for this!

namely, that gui configs are silly and i hate them.
config files are so much nicer, because you can

perhaps i should just make an icon that opens up 'redak ~/.config/n9-button-monitor.ini'

p.s. the next thing i would do for this would be quiksnap, which i have working but not plugged in because life is hard. i also want to make the buttons not do volume/profile/etc in normal apps, but thats probably more or less impossible

flopjoke 2012-10-20 09:28

Re: [Anounce] [N9] Volume/Power Button Monitor
 
quiksnap? As in screenshot? Like press volume up and down together to take a screenshot .. or am I dreaming too much? :D

Leave the GUI as it is if you want it that way.. it's not biggie really. I used it to show some iPhone people that "oh look, N9 can even run Windows 98!" So it is cool sometimes :P

HtheB 2012-10-20 11:19

Re: [Anounce] [N9] Volume/Power Button Monitor
 
Well, I'm still waiting for the "volume button a la HtheB" :p (force to use "always media volume control)"

wolke 2012-10-20 18:14

Re: [Anounce] [N9] Volume/Power Button Monitor
 
lolololollololololololololololololol win98

htheb, youre aware of the two obstacles right?
1) we have to cancel ALL default actions in ALL apps. i dont know if this is possible without touching the apps themselves, which are mostly closed. {this needs to still let n9-button-monitor receive the events; disabling the buttons completely wont solve it, of course}
2) {and i HALF solved this one} we have to be able to programmatically control the volume. i can only do this with a mafw application running in the background, which i may be able to do as a daemon


solicit someone who has some experience with the mostly-closed-source guts of harmattan to do #1 for us, and i will deliver you your application. i personally cant fathom how to accomplish #1, and i spent awhile banging my head.

wolke 2012-10-20 18:17

Re: [Anounce] [N9] Volume/Power Button Monitor
 
quiksnap like take a picture with the camera from the lockscreen. like when the cat is being cute.

for screenshot, we could do long-click of volume down, but be aware that your phone would go into silent mode while we did...because of the problem#1 in the post above


All times are GMT. The time now is 11:07.

vBulletin® Version 3.8.8