Ubuntu – Is it possible to assign a keyboard shortcut to cause the Looking Glass to appear

11.10gnomejavascriptshortcut-keys

On Ubuntu 11.10, using GNOME Shell, I find myself using the "Looking Glass" JavaScript Console very much. I know how to assign desktop shortcuts in general; but, this seems a little unusual.

Instead of typing Alt+F2lgEnter, I'd like to assign a shortcut key to perform this. However, shortcuts normally require a command file and there's the rub. I am unaware of a command file for the looking glass tool.

How can I set a keyboard shortcut to perform the Alt+F2lgEnter keystrokes?

Clarification: Instead of pressing a 4-key sequence, I want to use a 1-key shortcut to invoke lg.

Best Answer

You can use this GNOME extension to assign a keyboard shortcut to activate looking-glass.

By default, it uses Super+ X to activate looking-glass but you can configure that keyboard shortcut.


Alternatively, you can use the command to activate looking-glass and bind it to a specific keyboard shortcut.

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.lookingGlass.toggle();'