- Name/IRC nick: nephros
- Topic: Handling of X10iii hardware button (Assistant Button)
- Some details about the topic:
This is related to this feature request.
Please advise on a way forward with supporting the unhandled button present on X10iii devices.
Question 1: Making the key accessible to the OS components:
AFAICS there are several options of handling the key event:
- Re-use the existant functionality of MCE and lipstick-jolla-home and map the button to a HOME key. This has been done in this PR I propose.
- Replicate the handling of the HOME key in MCE (like 1, above), but send a separate signal to lipstick. This approach I am exploring in this branch.
- Similar to 1. and 2., but handle it in the
evdev
codepath of MCE rather than the powerkey
one.
- Not caring about MCE at all, make the key code known to Qt, so one can use Qt.Key_xxx, and implement handling similar to
Qt.Key_HomePage
, see lipstick-jolla-home-qt5/compositor.qml
Line 1800, and lipstick-jolla-home-qt5/compositor/HardwareKeyHandler.qml
- other?
Question 2: Handling key press events
Once the button press can be signalled to the OS, it should do something. Preferably this should be user-configurable. (The Feature Request thread contains a selection of ideas users might use this for.)
I see the following variants:
a) in Lipstick/compositor, hardcode a certain set of UI actions, similar to what is today done with the Home key, and the keys handled in HardwareKeyHandler
.
b) in MCE/mce-tool, implement something similar to power key handling, where a set of dbus calls (actions) can be defined, and selected to be executed on press
c) in Lipstick/compositor, support a single dconf key containing the name of an application .desktop file, which shall be launched when the button is pressed.
d) in Lipstick/compositor, support a set of dconf keys, which can contain the parameters of a dbus call (i.e. some or all of the parameters of invokeDBusMethod()
from lipstick-jolla-home-qt5/compositor.qml
Line 566)
e) hardcode a Jolla-conceived very sexy killer feature which makes everyone go “wow you can do that??”
D would be the most flexible, but has potential for abuse, security concerns, and might impact stability.
If there is interest, I have a working PoC of variant 2 plus C I can share.
- Approx. time needed: 10-15 min, further clarification could also happen on the PR mentioned.
- Substitute (optional):