messageList: Allow dismissal via backspace
Currently only the delete key can be used to dismiss notifications. Some laptops don't have delete keys, resulting in needing to hit a modifier to trigger delete. Plus, on those keyboards that do have delete keys they're often a little harder to strike than backspace. https://gitlab.gnome.org/gnome/gnome-shell/-/issues/5789 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2435>
This commit is contained in:
parent
8619b7637d
commit
f119e5282b
@ -543,7 +543,8 @@ export const Message = GObject.registerClass({
|
||||
let keysym = event.get_key_symbol();
|
||||
|
||||
if (keysym === Clutter.KEY_Delete ||
|
||||
keysym === Clutter.KEY_KP_Delete) {
|
||||
keysym === Clutter.KEY_KP_Delete ||
|
||||
keysym === Clutter.KEY_BackSpace) {
|
||||
if (this.canClose()) {
|
||||
this.close();
|
||||
return Clutter.EVENT_STOP;
|
||||
|
Loading…
Reference in New Issue
Block a user