to.set_notification_message
set_notification_message
sets or remove the notification message.
{
"to": [
{
"set_notification_message": {
"id": "identifier of the message",
"text": "message text"
}
}
]
}
Name | Required | Description |
---|---|---|
id |
Required | Specify an unique string for your notification message |
text |
Required | Message body |
How to remove the notification message
Set empty string totext
to remove the notification message.
Examples
Show the notification message while you press right shift key.
{
"type": "basic",
"from": {
"key_code": "right_shift",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
// Show the notification message
"set_notification_message": {
"id": "org.pqrs.notificaion_message_example",
"text": "Hello World!"
}
},
{
"key_code": "right_shift"
}
],
"to_after_key_up": [
{
// Hide the notification message
"set_notification_message": {
"id": "org.pqrs.notificaion_message_example",
"text": ""
}
}
]
}