Reply
Thread Tools
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#161
Originally Posted by wolke View Post
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
i vote for both

The silent mode is a small price for the ease of access...
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#162
Originally Posted by thedead1440 View Post
i vote for both

The silent mode is a small price for the ease of access...
im afraid i cant quite agree. i personally only use n9-button-monitor on the standby screen and specific apps where i can cancel the vol+/- button actions like FBReader.

the fact that the buttons also changes the profile {or the volume, or the camera zoom, or whatever weird fit takes their fancy} is a large detriment to n9bm's usability elsewhere.


you can do the screenshot bit yourself, btw, with n9-button-monitor as it stands.

make a script that will take a screenshot, and add an action with "cmd(that-script.sh)" and no condition, et voila
__________________
~ teleshoes ~
 
flopjoke's Avatar
Posts: 426 | Thanked: 374 times | Joined on Apr 2012 @ Middle East
#163
My phone is always on silent anyway, so I'm not bothered by that..

But maybe to get past that, can we have two button presses at the same time? Like I said before - press volume up and down together to take screenshot. Or Press up and then down in rapid succession, so if your phone was in silent, it'll go to beep, then back to silent again and there will be no change. Is it possible to detect that by the button monitor?
__________________
Architectural Engineer and Graphic Designer.
[Contact me for any designing work.]

Portfolio: AKstudios : : graphics with attitude.
Flickr: AKstudios
Twitter: @flopjoke
 
HtheB's Avatar
Moderator | Posts: 3,715 | Thanked: 7,419 times | Joined on Dec 2009 @ Bize Her Yer Trabzon
#164
Originally Posted by wolke View Post
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.
Yeah, the plan was to make some deamon running in the background to make the volume buttons work as media volume buttons. I haven't heard anything from it anymore, thats why im still waiting for it

make this and ull get your 3th donation
__________________
www.HtheB.com
Please donate if you think I'm doing a good job.
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#165
htheb
heh. actually thats the easy part, and i could get that working fairly easily.
the HARD part is in stopping the default actions like profile change and camera zoom. without THAT, a volume-change-key-daemon would obviously be useless.

flopjoke
actually, it USED to work like that, so that you could define arbitrary button press patterns, like "UpPress, DownPress, DownRelease, UpRelease".
everyone told me that the patterns were ridiculous, confusing to describe, hard to press, and fairly useless. they were quite right.


what you can do instead is simply bind the screenshot button to double-press up, and then double-press down on your own to compensate. or vice-versa, depending on whether you like silent mode on more often or not.

{what im describing here is still perfectly do-able without any change to n9bm}
__________________
~ teleshoes ~
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#166
so i dont have an n9 anymore thanks to hurricane sandy.

turns out an empty condition is a parse error, so i did need to add a condition to support the feature flopjoke wanted. i added the screenshot action while i was there for convenience, with flopjoke compiling and testing it for me.

new version 0.4.5

1) condition=always
2) action=screenShot

note that the screen shot is always in portrait mode, like screenshotmee. screenshotmee lets you rotate the pic afterwards in a gui. n9bm just makes the file and lets you do what you want with it.
__________________
~ teleshoes ~
 

The Following 5 Users Say Thank You to wolke For This Useful Post:
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#167
wolke,

So you have now lost 2 n9s?
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#168
oh, i see youve heard the phrase 'rubbing it in' and are a fan of it!
__________________
~ teleshoes ~
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#169
im adding a dbus listener to get bluetooth speaker buttons.

i just finished testing a standalone python script. if anyone has a bluetooth thingie with media buttons, i would appreciate your testing this out.

i have a hipe shower speaker, and mine does this silly thing where it occasionally sends button clicks 8 times from a single click. im especially curious to know whether this is my fault, hipe's, or nokia's.
__________________
~ teleshoes ~
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#170
heres the python script. you have to install some stuff.

apt-get install python-dbus python-pyside.qtcore


name it dbusbtn.py. copy it to MyDocs and run it like this:

Code:
user:~$ python /home/user/MyDocs/dbusbtn.py
button: previous-song
  ignored: previous-song
  ignored: previous-song
  ignored: previous-song
  ignored: previous-song
  ignored: previous-song
  ignored: previous-song
  ignored: previous-song
button: next-song
button: play-cd
button: stop-cd

Code:
#!/usr/bin/python
#N9 Button Monitor
#Copyright 2012 Elliot Wolk
# 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.

import sys
import time
import signal
from traceback import print_exc
 
import dbus
from dbus.mainloop.glib import DBusGMainLoop
from PySide.QtCore import QCoreApplication

signal.signal(signal.SIGINT, signal.SIG_DFL)
dbus_service="org.freedesktop.Hal"
dbus_path="/org/freedesktop/Hal/devices/computer_logicaldev_input_0"
dbus_interface="org.freedesktop.Hal.Device"
dbus_member="Condition"

## for some horrible reason, i get 8 clicks sometimes
## this buffer ignores repeated clicks within a certain time
## set it to -1 to never ignore
repeat_buffer_millis=800

last_button_click_millis = dict()

def button_clicked(button, handler):
  now_millis = int(round(time.time() * 1000))
  if button in last_button_click_millis:
    then_millis = last_button_click_millis[button]
    if now_millis - then_millis < repeat_buffer_millis:
      print >> sys.stderr, "  ignored: " + button
      return

  last_button_click_millis[button] = now_millis
  handler(button)

def defaultHandler(button):
  print >> sys.stderr, "button: " + button

def connectButtonDbus(handler=defaultHandler):
  dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
  bus = dbus.SystemBus()
  try:
    obj = bus.get_object(dbus_service, dbus_path)
    iface = dbus.Interface(obj, dbus_interface)
  except dbus.DBusException:
    print_exc()
    sys.exit(1)
 
  iface.connect_to_signal(dbus_member,
    lambda cond, arg: button_clicked(arg, handler))

if __name__ == '__main__':
  app = QCoreApplication([])
  connectButtonDbus()
  app.exec_()
__________________
~ teleshoes ~

Last edited by wolke; 2013-01-06 at 18:46.
 

The Following User Says Thank You to wolke For This Useful Post:
Reply

Tags
harmattan, nokia n9


 
Forum Jump


All times are GMT. The time now is 08:33.