mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
keyboard: Do key presses on actual key press
It was mistakenly connecting twice to the 'released' signal. Also, move level changes to key release, since it will be more convenient to hook latched states on long press. https://gitlab.gnome.org/GNOME/gnome-shell/issues/46
This commit is contained in:
parent
7f8a1ec1fb
commit
0608413b96
1 changed files with 4 additions and 4 deletions
|
|
@ -807,14 +807,14 @@ var Keyboard = new Lang.Class({
|
|||
|
||||
let actor = extraButton.keyButton;
|
||||
|
||||
extraButton.connect('pressed', Lang.bind(this, function() {
|
||||
if (keyval != null)
|
||||
this._keyboardController.keyvalPress(keyval);
|
||||
}));
|
||||
extraButton.connect('released', Lang.bind(this, function() {
|
||||
if (switchToLevel != null)
|
||||
this._onLevelChanged(switchToLevel);
|
||||
else if (keyval != null)
|
||||
this._keyboardController.keyvalPress(keyval);
|
||||
}));
|
||||
extraButton.connect('released', Lang.bind(this, function() {
|
||||
if (keyval != null)
|
||||
this._keyboardController.keyvalRelease(keyval);
|
||||
else if (action == 'hide')
|
||||
this.hide();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue