Closed Johennes closed 3 years ago
Additionally, the indev needs to be assigned a group with at least one element.
Uh, it's really odd. I forgot about it. Usually, if there is a KEYPAD
indev there are group(s) too but it's really no that logical.
Maybe it'd be better if the client would supply a custom readcb and handle the KEY... events manually because in the case of KEY_POWER, we don't really need any of the group logic?
If we can't give clean solution IMO it's better to leave it to the user as you suggested.
If we can't give clean solution IMO it's better to leave it to the user as you suggested.
Ok, that sounds fair. I'll close this.
This makes it possible to automatically locate power buttons (which have
KEY_POWER)
via libinput. Additionally, a newLV_KEY_POWER
key is introduced that is dispatched whenever KEY_POWER is pressed.In order to handle
LV_KEY_POWER,
the client needs to register an indev with typeLV_INDEV_TYPE_KEYPAD
and set thefeedback_cb
callback. Additionally, the indev needs to be assigned a group with at least one element.Note: This is a draft and I'd like to get feedback on it. The fact that a group has to be assigned feels a little odd but that was the only way to make
feedback_cb
be called. After having tried it out, I'm not sure if this is a good way to implement support forKEY_POWER
. Maybe it'd be better if the client would supply a customread_cb
and handle theKEY_...
events manually because in the case ofKEY_POWER
, we don't really need any of the group logic?Fixes: #161