data: Add key press/release events
While we have "button-{pressed,released}" events there's often the
desire to control sound for key presses of e.g. on screen keyboards too.
Add separate events for that.
This allows us to e.g. add a particular sound for OSK key presses and
OSKs can send this with an `important` hint so they're also usable
in silent mode.
Closes: https://gitlab.freedesktop.org/agx/feedbackd/-/issues/85
Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
@@ -29,6 +29,16 @@
|
|||||||
"type" : "Sound",
|
"type" : "Sound",
|
||||||
"effect" : "camera-shutter"
|
"effect" : "camera-shutter"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"event-name" : "key-pressed",
|
||||||
|
"type" : "Sound",
|
||||||
|
"effect" : "key-pressed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"event-name" : "key-released",
|
||||||
|
"type" : "Sound",
|
||||||
|
"effect" : "key-released"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"event-name" : "message-new-cellbroadcast",
|
"event-name" : "message-new-cellbroadcast",
|
||||||
"type" : "Sound",
|
"type" : "Sound",
|
||||||
@@ -116,6 +126,17 @@
|
|||||||
"type" : "VibraRumble",
|
"type" : "VibraRumble",
|
||||||
"duration" : 12
|
"duration" : 12
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"event-name" : "key-pressed",
|
||||||
|
"type" : "VibraPattern",
|
||||||
|
"magnitudes" : [ 0.2 ],
|
||||||
|
"durations" : [ 7 ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"event-name" : "key-released",
|
||||||
|
"type" : "VibraRumble",
|
||||||
|
"duration" : 12
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"event-name" : "message-new-cellbroadcast",
|
"event-name" : "message-new-cellbroadcast",
|
||||||
"type" : "VibraPattern",
|
"type" : "VibraPattern",
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ These events are meant to be used by system components.
|
|||||||
- *battery-caution*: The event used when the battery is nearing exhaustion (below 40%, for example).
|
- *battery-caution*: The event used when the battery is nearing exhaustion (below 40%, for example).
|
||||||
- *battery-full*: The event used when the battery is fully loaded up.
|
- *battery-full*: The event used when the battery is fully loaded up.
|
||||||
- *device-added*: The event used when a device has become available to the desktop, i.e. due to USB plugging.
|
- *device-added*: The event used when a device has become available to the desktop, i.e. due to USB plugging.
|
||||||
|
- *key-pressed*: The event used when a key on e.g. an on screen keyboard is pressed.
|
||||||
|
- *key-released*: The event used when a key on e.g. an on screen keyboard is released.
|
||||||
- *message-missed-notification*: The event used when a notification was shown but not seen by the user. (*deprecated*)
|
- *message-missed-notification*: The event used when a notification was shown but not seen by the user. (*deprecated*)
|
||||||
- *message-new-cellbroadcast*: The event used when a new cell broadcast message is received.
|
- *message-new-cellbroadcast*: The event used when a new cell broadcast message is received.
|
||||||
- *notification-missed-generic*: The event used when a generic notification was
|
- *notification-missed-generic*: The event used when a generic notification was
|
||||||
|
|||||||
Reference in New Issue
Block a user