action on phisical button on 4.0.4
Moderator: Martin
action on phisical button on 4.0.4
hi, I'm not able to assign any action to phisical buttons (home, volume..). the assist trigger doesn't work because of android 4.0.4, also tried with xposed framework various module but nothing, before I quit can someone please
confirm me that it's impossible to do or there's a solution? thanks 
Re: action on phisical button on 4.0.4
Hi,
It's probably not possible in the current version of Automagic. It should be possible to do something like this with the next version of Automagic with the new trigger Command Output.
It will be quite complicated and requires a rooted device with command getevent. I only tested this on an S3 and a Nexus 5 for now so it might not work on all devices.
Regards,
Martin
It's probably not possible in the current version of Automagic. It should be possible to do something like this with the next version of Automagic with the new trigger Command Output.
It will be quite complicated and requires a rooted device with command getevent. I only tested this on an S3 and a Nexus 5 for now so it might not work on all devices.
Regards,
Martin
Re: action on phisical button on 4.0.4
I played around with the getevent and sendevent shell commands and effectively works for me but it's a little complicated to set a function, needs to record the buttons or taps with getevent and reproduce the codes with sendevent in decimal.
I wish if you can get this process more easy, thanks
I wish if you can get this process more easy, thanks
Re: action on phisical button on 4.0.4
getevent supports some options that can make it easier to work with.
getevent -l will also print the name of the keys. Output will look like this:
Instead of sendevent it's often possible to use command input to press some keys or produce touch input.
getevent -l will also print the name of the keys. Output will look like this:
Code: Select all
/dev/input/event1: EV_KEY KEY_VOLUMEDOWN DOWN
/dev/input/event1: EV_SYN SYN_REPORT 00000000
/dev/input/event1: EV_KEY KEY_VOLUMEDOWN UP
/dev/input/event1: EV_SYN SYN_REPORT 00000000Code: Select all
usage: input ...
input text <string>
input keyevent <key code number or name>
input tap <x> <y>
input swipe <x1> <y1> <x2> <y2>Re: action on phisical button on 4.0.4
thanks, I know about keyevent but prior to jelly bean does not support taps, I have ics.
for the getevent I use in terminal
getevent | grep event<code>
and returns the codes of the the keys or taps (usually 6 lines for 1 tap) like
/dev/input/event<code>: <hex> <hex> <hex>
, example event0 for touch or event1 for phisical keys, then I convert this codes in decimal and use them in
sendevent /dev/input/event<code> <dec> <dec> <dec>
every group of lines (single tap) end with 0 0 0, for long press I put a sleep 1 command before last line of zeros.
it works for me, altough for who can't use controlUI action due to pre-JB roms.
for the getevent I use in terminal
getevent | grep event<code>
and returns the codes of the the keys or taps (usually 6 lines for 1 tap) like
/dev/input/event<code>: <hex> <hex> <hex>
, example event0 for touch or event1 for phisical keys, then I convert this codes in decimal and use them in
sendevent /dev/input/event<code> <dec> <dec> <dec>
every group of lines (single tap) end with 0 0 0, for long press I put a sleep 1 command before last line of zeros.
it works for me, altough for who can't use controlUI action due to pre-JB roms.