So this works! I shut down the Pi, put the SD card in my PC, opened the /boot/config.txt and added GPIOs and associated them with "BUTTON_x" and also edited the key numbers to match the reference you gave me. Followed the format of what was there for volume and power buttons. I connected a push button to GPIO26 (it is BUTTON_7).
Rebooted and configured Tasker to give me a toast with "GPIO pressed" and set up a profile for AutoInput to detect Button 7. Backed out and took a breath. Pressed the button and got the toast when I released (I had designated the key up/down backwards), so I went back to tasker and designated the proper key, also added a profile to flash "GPIO released" to correspond to the releasing of the button.
Pressed the button - got the "GPIO26 pressed" toast
Released the button - got the "GPIO26 released" toast
SUCCESS! Except I also noticed that the pressing the button caused my screen to highlight an app on my home screen. Subsequent presses and releases also did a few things like changing the focus, opening apps, showing extended menus...apparently Button 7 already has an assignment in Android. I need to associate GPIO26 with a different key that is not already monitored by Android! I see in your link that BUTTON_1 through BUTTON_16 are listed twice. What is the difference?
Overall, I'd say this has taken a HUGE leap forward in what I was trying to do. I look forward to learning more and refining this. You are AWESOME for taking the time to develop this and supporting us!
Rebooted and configured Tasker to give me a toast with "GPIO pressed" and set up a profile for AutoInput to detect Button 7. Backed out and took a breath. Pressed the button and got the toast when I released (I had designated the key up/down backwards), so I went back to tasker and designated the proper key, also added a profile to flash "GPIO released" to correspond to the releasing of the button.
Pressed the button - got the "GPIO26 pressed" toast
Released the button - got the "GPIO26 released" toast
SUCCESS! Except I also noticed that the pressing the button caused my screen to highlight an app on my home screen. Subsequent presses and releases also did a few things like changing the focus, opening apps, showing extended menus...apparently Button 7 already has an assignment in Android. I need to associate GPIO26 with a different key that is not already monitored by Android! I see in your link that BUTTON_1 through BUTTON_16 are listed twice. What is the difference?
Overall, I'd say this has taken a HUGE leap forward in what I was trying to do. I look forward to learning more and refining this. You are AWESOME for taking the time to develop this and supporting us!
Statistics: Posted by duckredbeard — Fri Dec 08, 2023 1:53 am