screenshot-ui: Bind Ctrl-C, Enter, Space to capture
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1954>
This commit is contained in:
parent
6f42eaf17d
commit
e12689108a
@ -362,6 +362,18 @@ class ScreenshotUI extends St.Widget {
|
|||||||
|
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vfunc_key_press_event(event) {
|
||||||
|
const symbol = event.keyval;
|
||||||
|
if (symbol === Clutter.KEY_Return || symbol === Clutter.KEY_space ||
|
||||||
|
((event.modifier_state & Clutter.ModifierType.CONTROL_MASK) &&
|
||||||
|
(symbol === Clutter.KEY_c || symbol === Clutter.KEY_C))) {
|
||||||
|
this._onCaptureButtonClicked();
|
||||||
|
return Clutter.EVENT_STOP;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.vfunc_key_press_event(event);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user