maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   [Announce] [SFOS] Volume/Camera Button Monitor (https://talk.maemo.org/showthread.php?t=100936)

wolke 2020-01-21 06:13

[Announce] [SFOS] Volume/Camera Button Monitor
 
so many years later, finally implemented a hardware button monitor for sailfish!

functionality is similar to n9-button-monitor.

you can use sf-button-monitor to run arbitrary commands while the phone is locked, or unlocked.

tested and working on Xperia X and Xperia X Compact, YMMV

NOTE: core functionality provided by simply reading from:
Code:

/dev/input/by-path/platform-gpio_keys.105-event
dependencies:
perl
dbus-send (for all CONDITIONS, and for all ACTIONS except cmd(SHELL_CMD))

the following unrelated hacks make this script more useful:
-dont unlock the screen when pressing volume/camera
-dont control media volume when screen is locked
-write window title to a file so window() condition can tell which program is running


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

wolke 2020-01-21 06:16

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
ALSO: this script is only useful if you turn off display-unlock-with-volume/camera with mcetool:
Code:

mcetool --set-exception-length-volume=0
mcetool --set-exception-length-camera=0

and also if you modify lipstick to not modify media volume while screen is locked:
/usr/share/lipstick-jolla-home-qt5/volumecontrol/VolumeControl.qml
Code:

*** 473,478 ****
--- 473,481 ----
          }
          onVolumeChanged: restartHideTimerIfWindowVisibleAndWarningNotVisible()
          onVolumeKeyPressed: {
+            if (Lipstick.compositor.screenIsLocked) {
+              return
+            }
              if (keyRepeat.running || keyRepeatDelay.running) {
                  if (Lipstick.compositor.visible) {
                      screenshotTimer.restart()


Kabouik 2020-01-21 08:38

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
I'll be trying that soon on the Proš, it should be very useful, thanks!

Can this be used for events like the following (keyboard open/closed state)?

Code:

/dev/input/event2: 1579511420.010 - 0x05/EV_SW - 0x00a/SW_KEYPAD_SLIDE - 0
Code:

/dev/input/event2: 1579511420.010 - 0x05/EV_SW - 0x00a/SW_KEYPAD_SLIDE - 1

mosen 2020-01-21 10:04

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Very Cool!
On Proš there are different files.

Code:

cat /dev/input/by-path/platform-c17a000.i2c-event-kbd
produces following output when hammering the harware kbd:
Code:

�&^S
�&^S
�&^��%�&^���&^�%�&^��&^��%�&^���&^B�%�&^B��&^�
                                              %�&^�
�&^����&^��^C^Z -�&^Z  �&^3C��&^3C�&^�7��&^�7�&^�v�&^

When i copy that path into your scripts $INPUT_DEV i get no output from your script however.

For kbd open/close, volume and powerbutton i get same formated values from

Code:

cat /dev/input/by-path/platform-soc\:gpio_keys-event
there is a 3rd file in that folder that i could not quench cat output from.
Code:

platform-1711a000.sound-tavil-event

wolke 2020-01-21 14:32

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
on x compact, SFOS 3.2.1.20, the key is in the 10th byte and the value (press/release) is in the 12th. (each key press/release produces 16 bytes)

just cat it to a file, press a single key, ctrl+c, and then read the bytes (with hexdump or something). do it 3x with the same key, and 3x with a different key and compare/contrast

mosen 2020-01-21 14:43

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Will try. Thanks for the explanation!

But i have to correct, your script with adapted path to that of the Proš gives output on exactly one key of the hardware keyboard.

It is the w key on QWERTZ / q key on QWERTY that does that if pressed multiple times in a row:
Code:

EVENT: CAM_HALF => press              1239ms  (ch-press)
EVENT: CAM_HALF => release              87ms  (ch)
EVENT: CAM_HALF => press              197ms  (ch ch-press)
EVENT: CAM_HALF => release              86ms  (ch ch)
EVENT: CAM_HALF => press              148ms  (ch ch ch-press)
EVENT: CAM_HALF => release              62ms  (ch ch ch)
EVENT: CAM_HALF => press              119ms  (ch ch ch ch-press)
EVENT: CAM_HALF => release              61ms  (ch ch ch ch)
EVENT: CAM_HALF => press              103ms  (ch ch ch ch ch-press)
EVENT: CAM_HALF => release              81ms  (ch ch ch ch ch)
EVENT: CAM_HALF => press                94ms  (ch ch ch ch ch ch-press)
EVENT: CAM_HALF => release              76ms  (ch ch ch ch ch ch)
EVENT: CAM_HALF => press                99ms  (ch ch ch ch ch ch ch-press)
EVENT: CAM_HALF => release              89ms  (ch ch ch ch ch ch ch)

EDIT:
https://mosushi.de/misc/keyboard-single1.txt
Above link is cat > keyboard-single1.txt with only the "1" pressed once.

https://mosushi.de/misc/keyboard-3x1.txt
This is the cat > keyboard-3x1.txt if i press the "1" key three times followed by "2" key three times.
Trying to makes sense of the output, figure to still post it quick since you all are faster. lol.

wolke 2020-01-21 16:11

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
in that case: modify my script, adding this line after line 195:
print "$buttonId ($value)\n";

then run it, press those buttons you want to do, and then add lines around 112 like this:
Code:

  [qw(16  KEY_W kw)],

mosen 2020-01-21 17:02

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Perfect, thank you.
Now i understand some more of the script.
I can print the assigned value to every key if i add them all in the block around line 115.

Specific to Proš:
"sym" is code 249.
"FX" is code 125.
"Yellow Mod" is code 100.
I guess the 100 is due to TheKits kernel mod to make it usable in sfos xkbd, right @kabouik?

wolke 2020-01-21 17:16

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
btw, if you get something cool working for you, please pull request your changes. i might not add them to master since i cannot test it in any way (i ONLY have xperias), but others might benefit from it, and i might buy an fxtec soon myself ;)

mosen 2020-01-21 17:42

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Quote:

Originally Posted by wolke (Post 1564601)
btw, if you get something cool working for you, please pull request your changes. i might not add them to master since i cannot test it in any way (i ONLY have xperias), but others might benefit from it, and i might buy an fxtec soon myself ;)

Do you think it is possible to do a patchmanager3 patch from that script and execute code on Key events? Or is it a potential battery hog?

EDIT:
Now i have the script altered for gpio read out and found code 10 is the state of the Keyboard.
10 - release is opened
10 - pressed is closed

EDIT 2:
Now i am able to switch on the keyboard backlight when it opens with this action in sf-button-monitor.conf
Code:

action=cmd(echo 1 > /sys/class/leds/keyboard-backlight/brightness),kb,always
where "kb" is defined as following in the script:
Code:

  [qw(10  KBD_STATE kb)],
I have not quite figured out how to set the backlight back to 0 on kbd close. But that is done anyway when the display goes off.

EDIT 3:
I just created a .desktop file in /user/share/applications/ to start the script from app-grid.
Works for now :P

wolke 2020-01-21 20:28

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Quote:

Do you think it is possible to do a patchmanager3 patch from that script and execute code on Key events?
hmm? you mean apply patches on the fly via cmdline, or do you mean to install this script as a patch, or something else? (im pretty sure the answer is no either way)


Quote:

Or is it a potential battery hog?
n9-button-monitor used almost no battery/cpu, but this works very differently from the already-existing hwbtn DBUS iface found on harmattan. afaict, sf-button-monitor uses very little CPU when buttons arent being pressed, but there is definitely the potential for performance problems

nice! are you running this as root btw, or does nemo have write perms on that brightness device? if the latter, ill happily add this as an action, and kb as a button, if it works at the same time as mine and you can test it on yours

mosen 2020-01-21 21:25

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
I was thinking how to have the script always running conveniently.
Monitoring it i found no obvious cpu usage, thats nice.

As a patch it would be started after boot but patches are ment to alter existing files, not to start up scripts, right?

They way i am doing currently is okish, only after boot i need to manually hit the Kbdlight starter and the script runs until killed.

But how to do this correct, is my noob question ;)

The script runs without superuser privs, as regular nemo user.

wolke 2020-01-21 21:52

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
no idea the 'correct' way to do this, but patchmanager is probably not a good way to do it, if you even can make it start a long-lived script.

i personally do all my auto-start crap like this:

1) make service file to run /usr/local/bin/autostart
Code:

nemo@sx:~$ cat /usr/lib/systemd/user/auto-start.service
[Unit]
Description=Auto-start stuff after lipstick
Requires=lipstick.service
After=lipstick.service

[Service]
Type=oneshot
ExecStart=/usr/local/bin/autostart
RemainAfterExit=yes

[Install]
WantedBy=user-session.target

2) make that service user-session.target wants:
Code:

nemo@sx:~$ ls -al /home/nemo/.config/systemd/user/auto-start.service /home/nemo/.config/systemd/user/user-session.target.wants/auto-start.service
lrwxrwxrwx 1 nemo nemo 40 Jan 19 02:55 /home/nemo/.config/systemd/user/auto-start.service -> /usr/lib/systemd/user/auto-start.service
lrwxrwxrwx 1 nemo nemo 40 Jan 19 02:55 /home/nemo/.config/systemd/user/user-session.target.wants/auto-start.service -> /usr/lib/systemd/user/auto-start.service

3) then i stick all sorts of stuff in /usr/local/bin/autostart:
Code:

nemo@sx:~$ cat /usr/local/bin/autostart
#!/bin/sh
PATH=/home/nemo/bin:$PATH

/home/nemo/bin/screen-daemon backup-daemon --start
/home/nemo/bin/screen-daemon email-daemon --start
/home/nemo/bin/screen-daemon button-monitor --start
sudo cpu-enable fast
aliendalvik-post-start


Kabouik 2020-01-21 22:22

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Thanks to both of you for progressing this fast! I didn't actually had the time to try myself and you already got something working. :D I guess I'll wait until your changes are merged Mosen. :>

Quote:

Originally Posted by mosen (Post 1564600)
I guess the 100 is due to TheKits kernel mod to make it usable in sfos xkbd, right @kabouik?

The limit with xkb is 255, not 100, if I am not mistaken.

mosen 2020-01-21 22:34

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Thanks for the explanation @wolke. That is some cool stuff. Will do for sure but i realize i derail your thread into things not related to your original topic.

In that regard it would be most interesting and useful to not only listen from one source $INPUT_DEV but multiple ones.

On Proš we have
/dev/input/by-path/platform-soc\:gpio_keys-event
For volume up, cam-button and Kbd-state

/dev/input/by-path/platform-c17a000.i2c-event-kbd
For the keys on the hwkbd

/dev/input/event0
For volume down and the power button.

How to combine those sources in one script to have all keys available to assign actions too?

olf 2020-01-22 00:07

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Quote:

Originally Posted by mosen (Post 1564616)

For deploying (and deleting when uninstalling) these files per RPM, you may use mount-sdcard's spec file as a template.
It also provides an example of a simple "one-shot" systemd system unit being deployed. Note that you have to deploy a user unit at the slightly different path /etc/systemd/user/ (= %{_sysconfdir}/systemd/user/, but do not use the OS' path /usr/lib/systemd/user/ as shown in section 1).
You also have to let RPM create the [Install] section links (result shown by @wolke in section 2) by a systemctl --user enable <unit> in a %post section and delete them per systemctl --user disable <unit> in a %preun section. Do not create them manually (either literally or in an RPM).

@mosen, you may even clone ("fork" in Github / Gitlab parlance) the mount-sdcard git repository as a starting point, as the git directory structure seems to fit well.

RPMs can be easily built on the device per:

* Preparation (once)
  • Creating necessary directories as nemo:
    Code:

    cd
    mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS}

  • Install rpmbuild (as root):
    Code:

    pkcon install rpm-build
* Building RPMs
  • Always as a simple user, never as root!
  • Download source tarball:
    Code:

    cd ~/rpmbuild/SOURCES/
    curl -LO <https://github.com/mosen/%{name}/archive/%{version}/%{name}-%{version}.tar.gz>

  • Extract and copy spec file:
    Code:

    cd ~/rpmbuild/
    tar -xvzf SOURCES/<%{name}-%{version}>.tar.gz
    cp <%{name}-%{version}>/rpm/*.spec SPECS/

  • Finally build the RPM per
    Code:

    rpmbuild -ba SPECS/<%{name}-%{version}>.spec

The only RPM documentation which comes somewhat close to a reference is still (though old and unmaintained): http://ftp.rpm.org/max-rpm/index.html
Plus many, many guides for noobs, absolute beginners, fresh starters, DAUs etc. exist (but none for advanced packagers) with lots of examples but no real explanations. The least worse of those are probably https://rpm-guide.readthedocs.io/en/latest/ and https://docs.fedoraproject.org/en-US...ide/index.html

P.S.: Better substitute every occurrence of /home/nemo/ in section 3 with ~/ to make it work for every user (as Jolla slowly prepares SailfishOS for multiple users).

HTH

wolke 2020-01-22 05:27

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Quote:

Originally Posted by mosen (Post 1564622)
How to combine those sources in one script to have all keys available to assign actions too?

try doing something like:
open $fh, "-|", "cat", "file1", "file2";
see if that works.

im not sure its a good idea to do the kb events one tho, that device probably gets a LOT of output as you type, and my script assumes relatively infrequent events

EDIT: of course the above doesnt work, wasnt thinking. use IO::Select and do can_read

wolke 2020-01-22 05:38

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
try something like this:
(untested on my side, and i wont be trying to support keyboard keys, i think)
Code:

diff --git a/src/sf-button-monitor b/src/sf-button-monitor
index fd08e4e..ffe8c9d 100755
--- a/src/sf-button-monitor
+++ b/src/sf-button-monitor
@@ -166,12 +166,14 @@ sub main(@){
  my @pattern;
  my $lastButtonMillis = nowMillis();
  open $inputDevFH, "< $INPUT_DEV";
+  open $kbDevFH, "< $KEYBOARD_DEV";
 
  my $select = IO::Select->new();
  $select->add($inputDevFH);
+  $select->add($kbDevFH);
 
  while(1){
-    my ($buttonId, $value) = readButtonEvent($inputDevFH);
+    my ($buttonId, $value) = readButtonEvent($select);
 
    my $now = nowMillis();
    my $elapsedMillis = $now - $lastButtonMillis;
@@ -212,15 +214,18 @@ sub main(@){
 
 #blocks until a valid button press/release event and then returns it
 sub readButtonEvent($){
-  my ($inputDevFH) = @_;
+  my ($select) = @_;
  my $byteStr;
  while(1){
-    read $inputDevFH, $byteStr, 16;
-    my @bytesDec = map {ord $_} split //, $byteStr;
-    my $buttonId = $bytesDec[10];
-    my $value = $bytesDec[12];
-    if(defined $OK_BUTTON_IDS{$buttonId}){
-      return ($buttonId, $value);
+    my @fhs = $select->can_read();
+    if(@fhs > 0){
+      read $fhs[0], $byteStr, 16;
+      my @bytesDec = map {ord $_} split //, $byteStr;
+      my $buttonId = $bytesDec[10];
+      my $value = $bytesDec[12];
+      if(defined $OK_BUTTON_IDS{$buttonId}){
+        return ($buttonId, $value);
+      }
    }
  }
 }


Kabouik 2020-01-22 10:54

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Not directly related to wolke's script, but related to the current discussion: we now have keyboard backlight support on the Proš with mce thanks to Elros34: https://github.com/sailfish-on-fxtec...ment-577118740

wolke 2020-01-28 23:25

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
added a bunch of features:

conditions: always, screenLocked, screenUnlocked, home, app(REGEX), noapp, anyapp, android

actions: cmd(SHELL_CMD), torch, screenshot, reboot, shutdown, openCamera, selfie, newAlarm, newNote, writeEmail

patterns: e.g: VU(VD VD) => hold V+, press V- twice, release V-

wolke 2020-01-29 05:04

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
MISSING FEATURES:

1) DONE get pid or command name of topmost window when that window is an aliendalvik app
the pid returned by the below cmd is for `system_server`:
Code:

dbus-send --print-reply --system
    --dest=org.nemomobile.lipstick /
    org.nemomobile.compositor.privateTopmostWindowProcessId

this means that app(maps) will return false when google maps is open, for example.

NOTE: this is done, but requires a hack in lipstick QML
https://talk.maemo.org/showpost.php?...8&postcount=30

2) ]keep-alive while locked without draining battery horribly (vol buttons dont wake phone up, and so sometimes the actions dont work) JUST GONNA USE keepalive-tool FOREVER :(

3) DONE-ISH long-press keys
just needs some clever event handling that i havent had time to implement

4) torch on/off (NOT toggle, which is already done)
probably easy to query torch state with DBUS, but if not, i could just write directly to the LED devices.
(i used to long press vol for torch, and release to turn it off, and liked that a lot)

5) multiple input devices, configuration options for input devices

6) support for optional EXACT pattern matching (have to not push any other keys before, in the middle, or after)
maybe: "^vu vu$" or something

7) configuration options for timeouts/delays/etc

8) SOLVED-EXTERNALLY OPTIONALLY disable volume button default actions, e.g. in certain apps (this would probably be completely separate from sf-button-monitor, if i can implement it)
solution:
add a dconf config item to volume control QML to optionally ignore
/usr/share/lipstick-jolla-home-qt5/volumecontrol/VolumeControl.qml
see: patch

9) new conditions: landscape, portrait

10) new action: forceClose (kill -9 pid of topmost window)

11) new action: lockOrientation

12) (optionally) support power button with journalctl mce

wolke 2020-01-29 14:35

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
if anyone knows how to do #1, #2, #4 or #8, it would be much appreciated

also, anyone have any feature requests (in addition to #5) while im still actively working on this?

Astaoth 2020-01-29 14:50

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Quote:

Originally Posted by wolke (Post 1564881)
if anyone knows how to do #1, #2, #4 or #7, it would be much appreciated

also, anyone have any feature requests (in addition to #5) while im still actively working on this?

Great work, thank you !

If it's possible, can you add :
- condition : screen orientation
- action : screen orientation lock, force to close (kill -9) current app

Screen orientation lock could be nice with the Pro1, when the keyboard is opened. However I don't know how to do the screen stuff :(

EDIT : a word missing : screen lock -> screen orientation lock

taixzo 2020-01-29 15:12

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
would it be possible to add a feature to run something when a button is double-clicked?

wolke 2020-01-30 19:03

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Quote:

Originally Posted by taixzo (Post 1564884)
would it be possible to add a feature to run something when a button is double-clicked?

:D thats like, the primary feature of this app. you do this by writing "vu vu" or "vd vd" or "cf cf" in that pattern

wolke 2020-01-30 19:13

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
Quote:

Originally Posted by Astaoth (Post 1564882)
If it's possible, can you add :
- condition : screen orientation
- action : screen orientation lock, force to close (kill -9) current app

added to the missing-feature list. all are sensible and should be relatively easy, when i get time. thanks!

wolke 2020-01-31 16:51

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
AARGHHH

i just tried for like half an hour straight to find a way to get the app name of the topmost window for android apps (lipstick dbus tells me its "system_server").

is this REALLY that hard? is there some obvious method im just not thinking of? maybe some dbus api i dont know about? or some wayland thing to get the last kb-focused window or something....

wolke 2020-01-31 19:31

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
yo, i hate wayland. couldnt there be some standard way of doing this for root users? i can list, kill, send keyboard input to, and otherwise manipulate every process on the system...but i cant know which one has active keyboard focus?

wolke 2020-01-31 20:16

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
fukket, im just gonna modify goddamn lipstick QML to write window title to a file in /tmp

bastards

wolke 2020-01-31 20:41

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
sigh, here it is. if you do this, then window() condition will match window title of the most recently opened app....

the file in question is:
/usr/share/lipstick-jolla-home-qt5/switcher/Switcher.qml

Code:

commit 4564109ada4d5e5f971bb3d173252ecc5a70ecff (HEAD -> master)
Author: Elliot Wolk <elliot.wolk@gmail.com>
Date:  Fri, 31 Jan 2020 15:28:14 -0500

    lipstick: write window title to /tmp/lipstick-window-title every time topmost window changes

diff --git a/CONFIG_FILES/%usr%share%lipstick-jolla-home-qt5%switcher%Switcher.qml b/CONFIG_FILES/%usr%share%lipstick-jolla-home-qt5%switcher%Switcher.qml
index e6d4f1b..1c7c4d4 100644
--- a/CONFIG_FILES/%usr%share%lipstick-jolla-home-qt5%switcher%Switcher.qml
+++ b/CONFIG_FILES/%usr%share%lipstick-jolla-home-qt5%switcher%Switcher.qml
@@ -294,10 +294,26 @@ SilicaFlickable {
        return count
    }
 
+    function writeFileOverHTTP(file, text) {
+        var request = new XMLHttpRequest();
+        request.open("PUT", "file://" + file, false);
+        request.send(text);
+        return request.status;
+    }
+
    Connections {
        target: Lipstick.compositor
        onMinimizeLaunchingWindows: switcherRoot.minimizeLaunchingWindows()
-        onTopmostWindowIdChanged: touchWindow(Lipstick.compositor.topmostWindowId)
+        onTopmostWindowIdChanged: {
+          var windowId = Lipstick.compositor.topmostWindowId
+          if(windowId > 0){
+            var window = Lipstick.compositor.windowForId(windowId)
+            if(window){
+              writeFileOverHTTP("/tmp/lipstick-window-title", window.title + "\n")
+            }
+          }
+          touchWindow(windowId)
+        }
    }
 
    function resetPosition(delay) {


wolke 2020-02-06 09:07

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
still working in (2). i cant figure out a way cause read() to actually wake up when theres input from the device.

anyone know a way to magically bless a process, or file on the filesystem, or something, that will prevent or interrupt deep sleep?

wolke 2020-09-05 15:27

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
so i decided to just run `keepalive-tool sf-button-monitor` to never let the phone deep sleep, ever.
my battery usage for a full day used to be 100%=>72%, and now its 100%=>61%. this is easily worth it, to have the button actions always work without unlocking the phone first. i had not realized how LITTLE deep sleep was actually doing for me.

wolke 2020-11-10 13:29

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
3 months of keepalive-tool running constantly, and my battery hasnt died once.
(the volume buttons just always work, locked or unlocked, like on the N9)

wolke 2021-07-02 14:23

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
added repeated-commands

e.g.:
action=repeat(500, brightness +1),ch-press vu-press,always
=> hold camera-half and volume-up to have brightness incrementally increase
(where `brightness` is a script you write)

mankir 2021-09-14 10:43

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
i get error loop on line 264 and 268, read on closed filehandle, use of uninitialized value $buttonId...

wolke 2022-06-21 04:12

Re: [Announce] [SFOS] Volume/Camera Button Monitor
 
updated for Xperia 10 III

added support for power button and "google assist" (camera) button.

power button also works now on Xperia XZ2 Compact, and maybe others (but not Xperia X or Xperia X Compact)

(power button still of course also always locks/unlocks the phone, so this is maybe not that useful)


All times are GMT. The time now is 19:05.

vBulletin® Version 3.8.8