pqrs-org / Karabiner-Elements

Karabiner-Elements is a powerful tool for customizing keyboards on macOS
https://karabiner-elements.pqrs.org/
The Unlicense
18.96k stars 840 forks source link

Add duration to set_notification_message #3956

Open eugenesvk opened 1 month ago

eugenesvk commented 1 month ago

Currently you can remove the notification message by calling set_notification_message with an empty message. But if you show notification after a delay to_delayed_action.to_if_invoked, you don't have any additional events later to hide the message, the key combination has done it's job and ended with a notification.

In this case it would be better to be able to set an "expiration delay" for a message in this initial event so that it can be shown after 1 second from a key press, but only for 2 seconds, and then you wouldn't need to blank it manually