Disable naked Super keybinding if sticky
With sticky keys, users should be able to press and release a modifier and then press a key to activate a modifier-key combination. Activating the overview on the Super key release keeps these users from using keyboard shortcuts involving the Super modifier. The solution implemented here is to simply disable the Super-release binding if sticky keys are enabled. It is still possible to go to the overview by using Super-S or Alt-F1. https://bugzilla.gnome.org/show_bug.cgi?id=685974
This commit is contained in:
parent
929e066506
commit
becf4396c9
@ -41,6 +41,9 @@ const Util = imports.misc.util;
|
|||||||
const OVERRIDES_SCHEMA = 'org.gnome.shell.overrides';
|
const OVERRIDES_SCHEMA = 'org.gnome.shell.overrides';
|
||||||
const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
|
const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
|
||||||
|
|
||||||
|
const A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard';
|
||||||
|
const STICKY_KEYS_ENABLE = 'stickykeys-enable';
|
||||||
|
|
||||||
let componentManager = null;
|
let componentManager = null;
|
||||||
let panel = null;
|
let panel = null;
|
||||||
let overview = null;
|
let overview = null;
|
||||||
@ -69,6 +72,7 @@ let _startDate;
|
|||||||
let _defaultCssStylesheet = null;
|
let _defaultCssStylesheet = null;
|
||||||
let _cssStylesheet = null;
|
let _cssStylesheet = null;
|
||||||
let _overridesSettings = null;
|
let _overridesSettings = null;
|
||||||
|
let _a11ySettings = null;
|
||||||
|
|
||||||
function _sessionUpdated() {
|
function _sessionUpdated() {
|
||||||
_loadDefaultStylesheet();
|
_loadDefaultStylesheet();
|
||||||
@ -157,9 +161,14 @@ function _initializeUI() {
|
|||||||
layoutManager.init();
|
layoutManager.init();
|
||||||
overview.init();
|
overview.init();
|
||||||
|
|
||||||
|
_a11ySettings = new Gio.Settings({ schema: A11Y_SCHEMA });
|
||||||
|
|
||||||
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
|
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
|
||||||
false, -1, 1);
|
false, -1, 1);
|
||||||
global.display.connect('overlay-key', Lang.bind(overview, overview.toggle));
|
global.display.connect('overlay-key', Lang.bind(overview, function () {
|
||||||
|
if (!_a11ySettings.get_boolean (STICKY_KEYS_ENABLE))
|
||||||
|
overview.toggle();
|
||||||
|
}));
|
||||||
|
|
||||||
// Provide the bus object for gnome-session to
|
// Provide the bus object for gnome-session to
|
||||||
// initiate logouts.
|
// initiate logouts.
|
||||||
|
Loading…
Reference in New Issue
Block a user