ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM
GNU General Public License v3.0
1.16k stars 59 forks source link

[Feature] Allow selection and activation of a notification action with arrow keys #186

Open tukusejssirs opened 1 year ago

tukusejssirs commented 1 year ago

It would be nice if we could select a notification action and activate it using a keyboard.

Currently, we can open the notification centre using a keyboard shortcut, as well as cycle through the notifications using Up and Down keys.

However, IMO we should be able to use Left and Right keys to cycle through the actions and Enter or Space to activate (execute) the selected action.

I don’t think that we should remember the selected action if we change the selected notification, thus we should always (by default) select the leftmost action in left-to-right writing systems and the rightmost action in the right-to-left writing systems.

ErikReider commented 1 year ago

That would be very finicky to add. You can select each action by pressing any of the 1..9 keys where 1 is the first action, 2 is the second action, etc...

tukusejssirs commented 1 year ago

Why would that be finicky to add? Because you need to check if the currently selected notification has actions and to keep track of which action is currently selected in order to execute it on Space and Enter?

You can select each action by pressing any of the 1..9 keys where 1 is the first action, 2 is the second action, etc...

I didn’t know about this. :+1:

That said, I still think that using Left, Right, Space and Enter is much more better from UX point of view, as we already use Up and Down for movement between notifications. In the f