After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 652082 - Keyboard shortcut to expand & focus notification banners
Keyboard shortcut to expand & focus notification banners
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
3.0.x
Other Linux
: Normal minor
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-06-07 20:53 UTC by El_Hoy
Modified: 2012-11-13 10:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
messageTray: Add a notification focus keybinding (3.31 KB, patch)
2012-11-08 14:46 UTC, Stéphane Démurget
committed Details | Review
messageTray: Close the notification on Escape (2.28 KB, patch)
2012-11-08 14:46 UTC, Stéphane Démurget
reviewed Details | Review
messageTray: Close the notification on Escape (2.28 KB, patch)
2012-11-08 18:01 UTC, Stéphane Démurget
committed Details | Review

Description El_Hoy 2011-06-07 20:53:06 UTC
When I receive notifications of chat I need to go with mouse and then it is not so usefull.

What about a hotkey to go to mini-chat windows, answer and come back (WIN+C or SUPER+C may be? (c for Chat) or with T(ray)?
Comment 1 Guillaume Desmottes 2011-06-08 09:07:14 UTC
That's done by gnome-shell, not Empathy. But yeah, I'd love such shortcut as well.
Comment 2 Allan Day 2012-08-23 10:40:55 UTC
Renaming for clarity. This is relevant:

https://live.gnome.org/GnomeOS/Design/Whiteboards/KeyboardShortcuts
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-09-27 23:53:44 UTC
This would be a simple fix for somebody interested.
Comment 4 Guillaume Desmottes 2012-10-09 15:48:07 UTC
This is fixed in Shell 3.6.0, use Super+M
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-10-09 15:50:03 UTC
No. That does not expand and focus banners, but opens the tray.
Comment 6 Allan Day 2012-10-19 14:38:57 UTC
Jon and Jimmac - any ideas for the keybinding to use here?
Comment 7 Jakub Steiner 2012-10-19 18:25:22 UTC
While we have plenty to throw around, I would be careful adding the <super>+? shortcut to everything. Maybe the keyboard driven response could involve the message tray, skipping the banner... <Super>+M, enter, respond...

But if you insist..

<Super>+b for banner
<Super>+x for being close ;)
Comment 8 Allan Day 2012-10-22 09:56:30 UTC
(In reply to comment #7)
> While we have plenty to throw around, I would be careful adding the <super>+?
> shortcut to everything. Maybe the keyboard driven response could involve the
> message tray, skipping the banner... <Super>+M, enter, respond...

If the last received notification receives keyboard focus in the tray, that could make sense. That said, there is direct manipulation issue here - if people see a banner then that is the focus of their desire to interact.

> But if you insist..
> 
> <Super>+b for banner

Is banner a term that we expose users to? Maybe <Super>+r for "reply" or <Super>+n for notification? Alternatively, we could base it off the location of the notification, like <Super>+Shift+Down.

> <Super>+x for being close ;)

Or escape?
Comment 9 Jasper St. Pierre (not reading bugmail) 2012-10-22 14:34:47 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > While we have plenty to throw around, I would be careful adding the <super>+?
> > shortcut to everything. Maybe the keyboard driven response could involve the
> > message tray, skipping the banner... <Super>+M, enter, respond...
> 
> If the last received notification receives keyboard focus in the tray, that
> could make sense. That said, there is direct manipulation issue here - if
> people see a banner then that is the focus of their desire to interact.
> 
> > But if you insist..
> > 
> > <Super>+b for banner
> 
> Is banner a term that we expose users to?

No. I still call them the toaster notifications.

> Maybe <Super>+r for "reply" or
> <Super>+n for notification?

Too close to <Super>+m.

Alternatively, we could base it off the location > of the notification, like <Super>+Shift+Down.

Ow, my fingers.

My suggestion: make Ctrl+Alt+Tab into <Super>Tab, and make Notification the first item in the list. It has the quick "switching focus" appeal, and (well, I have a patch to add "Windows" to Ctrl+Alt+Tab somewhere, as it's awkward otherwise) you can switch back easily.

The only unfortunate item is that it might break workflow for accessibility users who may get used to the panel always being the first item. Have we studied accessibility users to know if they'll rely on Orca saying things to them, or will assume that Panel is the first item in the list?
Comment 10 Jakub Steiner 2012-10-23 10:48:36 UTC
> > <Super>+x for being close ;)
> 
> Or escape?

I meant keys being physically close to each other for fast response with one hand. But it's not good proposal, really.
Comment 11 Lapo Calamandrei 2012-10-29 11:37:46 UTC
No idea about possible a11y issues involved, but I like Jasper proposal
Comment 12 Lapo Calamandrei 2012-10-29 12:06:17 UTC
rethinking the problem a bit, cycling focus looks like another issue to me (which would be cool to have some shared logic with gtk+), so a direct shortcut like super+n works for me.
Comment 13 Allan Day 2012-11-01 10:28:08 UTC
I don't see the proximity of the n key to m to be problematic (it could actually be a good thing). Super+n is still my preferred solution here.

If someone wants to try and fix this bug, please go for it. We can always argue about the exact keybinding later. :)
Comment 14 Stéphane Démurget 2012-11-08 12:50:25 UTC
I'm on it.
Comment 15 Stéphane Démurget 2012-11-08 14:46:29 UTC
Created attachment 228474 [details] [review]
messageTray: Add a notification focus keybinding

At the moment, only the mouse can be used to focus and answer a chat
notification.

This adds a new keybinding (defaults to <Super>+n) to focus and expand
the active notification.
Comment 16 Stéphane Démurget 2012-11-08 14:46:59 UTC
Created attachment 228475 [details] [review]
messageTray: Close the notification on Escape

Now that the notifications can be focused with the keyboard, it's
important we can close the active one also this way.
Comment 17 Jasper St. Pierre (not reading bugmail) 2012-11-08 14:48:53 UTC
Review of attachment 228474 [details] [review]:

As you could probably tell, I was hoping that someone would write this patch a lot quicker, given that it's not that hard.

But thanks!
Comment 18 Jasper St. Pierre (not reading bugmail) 2012-11-08 14:49:45 UTC
Review of attachment 228475 [details] [review]:

::: js/ui/messageTray.js
@@ +1395,3 @@
                                                    x_expand: true,
                                                    layout_manager: new Clutter.BinLayout() });
+        this._notificationWidget.connect('key-press-event', Lang.bind(this, this._onNotificationKeyPress));

This should probably be key-release. I've always found doing something on an immediate key press to be a little hasty.
Comment 19 Stéphane Démurget 2012-11-08 15:38:26 UTC
(In reply to comment #17)
> As you could probably tell, I was hoping that someone would write this patch a
> lot quicker, given that it's not that hard.
> 
> But thanks!

Sorry to take the easy ones, I'm waiting for input on more complex ones (657315 and 664204 mainly, 687583 possibly).

(In reply to comment #18)
> ::: js/ui/messageTray.js
> @@ +1395,3 @@
>                                                     x_expand: true,
>                                                     layout_manager: new
> Clutter.BinLayout() });
> +        this._notificationWidget.connect('key-press-event', Lang.bind(this,
> this._onNotificationKeyPress));
> 
> This should probably be key-release. I've always found doing something on an
> immediate key press to be a little hasty.

Well I wanted to ask the policy regarding this on #gnome-shell, because usually, keybindings without combination or modifier are good candidates for key press, especially enter/escape. This really feels a lot more reactive/faster for anyone (well, you win the few ms from releasing the key  for real :p).

I suppose this only works for extremely frequent and fast and non-dangerous actions (I would not do it for the overview for instance).

On a side note, sending a chat message is already on press, so you get the enter/escape duo on press.

You really want it on key release?
Comment 20 Stéphane Démurget 2012-11-08 18:01:47 UTC
Created attachment 228497 [details] [review]
messageTray: Close the notification on Escape

Now that the notifications can be focused with the keyboard, it's
important we can close the active one also this way.
Comment 21 Jasper St. Pierre (not reading bugmail) 2012-11-08 19:35:05 UTC
(In reply to comment #19)
> You really want it on key release?

This could just be habit, but a thing I do is press the escape key down when I'm almost finished reading, and then release it when the notification to go away.

Designers are free to override, but let's do key release for now.
Comment 22 Jasper St. Pierre (not reading bugmail) 2012-11-08 19:35:49 UTC
Review of attachment 228497 [details] [review]:

minor nit, otherwise looks fine

::: js/ui/messageTray.js
@@ +1601,3 @@
     },
 
+    _onNotificationKeyPress: function(actor, event) {

onNotificationKeyRelease
Comment 23 Stéphane Démurget 2012-11-08 20:27:40 UTC
Attachment 228474 [details] pushed as 7dc2355 - messageTray: Add a notification focus keybinding
Attachment 228497 [details] pushed as f30dcad - messageTray: Close the notification on Escape
Comment 24 Allan Day 2012-11-13 10:03:52 UTC
Seems that this is fixed. Thanks for your work, Stéphane.