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
@ -807,14 +807,14 @@ var Keyboard = new Lang.Class({
|
|||||||
|
|
||||||
let actor = extraButton.keyButton;
|
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() {
|
extraButton.connect('released', Lang.bind(this, function() {
|
||||||
if (switchToLevel != null)
|
if (switchToLevel != null)
|
||||||
this._onLevelChanged(switchToLevel);
|
this._onLevelChanged(switchToLevel);
|
||||||
else if (keyval != null)
|
else if (keyval != null)
|
||||||
this._keyboardController.keyvalPress(keyval);
|
|
||||||
}));
|
|
||||||
extraButton.connect('released', Lang.bind(this, function() {
|
|
||||||
if (keyval != null)
|
|
||||||
this._keyboardController.keyvalRelease(keyval);
|
this._keyboardController.keyvalRelease(keyval);
|
||||||
else if (action == 'hide')
|
else if (action == 'hide')
|
||||||
this.hide();
|
this.hide();
|
||||||
|
Loading…
Reference in New Issue
Block a user