screenshot: Allow any enter key activate capture

We currently only consider enter/return on the main keyboard
area, but not on the numpad.

Fix that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6128

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2777>
This commit is contained in:
Scott Buchanan 2023-05-26 16:20:58 +01:00 committed by Florian Müllner
parent 745667a825
commit 95daa577cf

View File

@ -2052,6 +2052,7 @@ export const ScreenshotUI = GObject.registerClass({
vfunc_key_press_event(event) {
const symbol = event.get_key_symbol();
if (symbol === Clutter.KEY_Return || symbol === Clutter.KEY_space ||
symbol === Clutter.KEY_KP_Enter || symbol === Clutter.KEY_ISO_Enter ||
((event.get_state() & Clutter.ModifierType.CONTROL_MASK) &&
(symbol === Clutter.KEY_c || symbol === Clutter.KEY_C))) {
this._onCaptureButtonClicked();