Skip to content

Commit 2a42b80

Browse files
authored
Support multiple key bindings for 'locate-pointer-key' (#11143)
1 parent 1877d2f commit 2a42b80

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/ui/locatePointer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const { Clutter, Gio, GLib, St } = imports.gi;
44
const Ripples = imports.ui.ripples;
5+
const Lang = imports.lang;
56
const Main = imports.ui.main;
67

78
const LOCATE_POINTER_ENABLED_SCHEMA = "org.cinnamon.desktop.peripherals.mouse"
@@ -21,8 +22,8 @@ var locatePointer = class {
2122

2223
_updateKey() {
2324
if (this._enabledSettings.get_boolean("locate-pointer")) {
24-
let modifierKey = this._keySettings.get_string('locate-pointer-key');
25-
Main.keybindingManager.addHotKey('locate-pointer', modifierKey, () => { this.show() });
25+
let modifierKeys = this._keySettings.get_strv('locate-pointer-key');
26+
Main.keybindingManager.addHotKeyArray('locate-pointer', modifierKeys, Lang.bind(this, this.show));
2627
} else {
2728
Main.keybindingManager.removeHotKey('locate-pointer');
2829
}

0 commit comments

Comments
 (0)