mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
keyboard: Only reset to the default level on unlocked latched levels
Reportedly, non-alphanumeric key levels were able to stick by
happenstance, and let the user press multiple keys until explicitly
switching to a different mode. Reportedly, this broke, switching to
the default level after the first key press on the additional levels.
Since we have this information in the OSK key models (each level has
a "mode" field to either default/latched/locked), retrieve this
information for them for each level, and only reset to the default
level if on one of those latched levels, and the relevant key was not
locked through long-press.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5763
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2945>
(cherry picked from commit bc3b890e75)
This commit is contained in:
parent
23787e391d
commit
408a7b5462
1 changed files with 2 additions and 1 deletions
|
|
@ -1492,6 +1492,7 @@ var Keyboard = GObject.registerClass({
|
|||
|
||||
let layout = new KeyContainer();
|
||||
layout.shiftKeys = [];
|
||||
layout.mode = currentLevel.mode;
|
||||
|
||||
this._loadRows(currentLevel, level, levels.length, layout);
|
||||
layers[level] = layout;
|
||||
|
|
@ -1528,7 +1529,7 @@ var Keyboard = GObject.registerClass({
|
|||
if (key.action !== 'modifier') {
|
||||
button.connect('commit', (_actor, keyval, str) => {
|
||||
this._commitAction(keyval, str).then(() => {
|
||||
if (!this._latched)
|
||||
if (layout.mode === 'latched' && !this._latched)
|
||||
this._setActiveLayer(0);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue