overviewControls: Handle overlay key
It's where all the fun state is handled now, so move the super-key handling there as well, in preparation of making it a bit more sophisticated. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1736>
This commit is contained in:
@ -16,6 +16,8 @@ const WorkspacesView = imports.ui.workspacesView;
|
||||
const SMALL_WORKSPACE_RATIO = 0.15;
|
||||
const DASH_MAX_HEIGHT_RATIO = 0.15;
|
||||
|
||||
const A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard';
|
||||
|
||||
var SIDE_CONTROLS_ANIMATION_TIME = Overview.ANIMATION_TIME;
|
||||
|
||||
var ControlsState = {
|
||||
@ -363,6 +365,15 @@ class ControlsManager extends St.Widget {
|
||||
},
|
||||
});
|
||||
|
||||
this._a11ySettings = new Gio.Settings({ schema_id: A11Y_SCHEMA });
|
||||
|
||||
global.display.connect('overlay-key', () => {
|
||||
if (this._a11ySettings.get_boolean('stickykeys-enable'))
|
||||
return;
|
||||
|
||||
Main.overview.toggle();
|
||||
});
|
||||
|
||||
Main.wm.addKeybinding(
|
||||
'toggle-application-view',
|
||||
new Gio.Settings({ schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA }),
|
||||
|
Reference in New Issue
Block a user