Adding new global keybindings from an extension
- From: Malcolm Locke <malc wholemeal co nz>
- To: gnome-shell-list gnome org
- Subject: Adding new global keybindings from an extension
- Date: Tue, 7 Feb 2012 00:24:40 +1300
Hi, apologies if this is the wrong place to ask this question.
I'm trying to write an extension to emulate Unity's dash shortcuts (e.g.
super+1 launches the first app on the dash, super+2 launches the second,
etc).
I've got most of the way, but I'm struggling to work out how to set up
global keybindings. At the moment I'm trying to do this, basade on the
code in js/ui/main.js:
global.stage.connect('captured-event', _keyPressHandler);
My _keyPressHandler() checks if the event was a key press, and if it was
within the range super+1 to super+9. However, the event never seems to
get triggered, unless I have the ALT+F2 command dialog open. I'm
presuming another callback bound to this event is halting the execution
of subsequent callbacks.
Any clues on how to approach a workaround would be greatly appreciated.
Malc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]