25 lines
632 B
JavaScript
25 lines
632 B
JavaScript
import GObject from 'gi://GObject';
|
|
export const KeybindingController = GObject.registerClass({
|
|
Signals: {
|
|
'keybinding-changed': {
|
|
param_types: [GObject.TYPE_STRING],
|
|
},
|
|
},
|
|
}, class KeybindingController extends GObject.Object {
|
|
update(key) {
|
|
this.emit('keybinding-changed', key);
|
|
}
|
|
});
|
|
var keybindingController = null;
|
|
/**
|
|
*
|
|
*/
|
|
export function getKeybindingController() {
|
|
if (keybindingController === null)
|
|
keybindingController = new KeybindingController();
|
|
return keybindingController;
|
|
}
|
|
export function destroyController() {
|
|
keybindingController = null;
|
|
}
|