Access Volume Button via bash - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone Pro (https://forum.pine64.org/forumdisplay.php?fid=177) +--- Forum: PinePhone Pro Hardware (https://forum.pine64.org/forumdisplay.php?fid=180) +--- Thread: Access Volume Button via bash (/showthread.php?tid=16487) |
Access Volume Button via bash - magdesign - 04-13-2022 Can someone please tell how I can read the state of the volume buttons (PinePhonePro) via bash ? Code: read KEY_VOLUMEDOWN **sidenote:** want to create a supersimple screenshooter for Phosh, it will help a lot in writing docs... RE: Access Volume Button via bash - magdesign - 04-21-2022 What I found https://xnux.eu/devices/feature/volumekeys.html On the PPP, there are following devices: Code: /dev/input/event0: gpio-vibrator So I am able to read if the Volume_Key is pressed (from adc-keys) with: Code: libinput debug-events --device=/dev/input/event1 Which gives me some debug outputs of the pressed hardware keys without debouncing: Code: event1 DEVICE_ADDED adc-keys seat0 default group1 cap:k The idea is to read this keys with something simple like: read or showkey to be able to make a simple if volume up and down statement to trigger screenshooter but I do not get input from the volume keys with this methods... RE: Access Volume Button via bash - TRS-80 - 04-30-2022 I know that SXMO are using volume keys extensively in their UIs (which are shell and dmenu based). I bet you could find something if you dig around over there a bit. If you can't find it, maybe ask in their IRC or mailing list. RE: Access Volume Button via bash - magdesign - 05-03-2022 (04-30-2022, 08:28 PM)TRS-80 Wrote: I know that SXMO are using volume keys extensively in their UIs (which are shell and dmenu based). I bet you could find something if you dig around over there a bit. If you can't find it, maybe ask in their IRC or mailing list. Thanks for the hint, could not find it so far there, but I'll keep on digging... RE: Access Volume Button via bash - TRS-80 - 05-15-2022 OK, I was just chatting with guys in #sxmo and they are basically using setting dwm to call sxmo_hook_inputhandler.sh upon button press. I don't know what window manager you are using, but setting something in there is probably the easiest way. As opposed to what you are trying to do is a bit more low level. |