2

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.

2 Answers2

2

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();'
jokerdino
  • 41,732
1

This answer probably doesn't solve the problem. See comments for details.

You can run any command by setting a custom command. To be precise you won't set a keyboard shortcut to perform Alt+F2lgEnter, but to run the command lg.

This question explains how to do so: How to bind custom commands to keyboard shortcuts?

lumbric
  • 4,129