Re: gnome-shell magnifier

Okay! I Just tested out the bash script idea! It works!

Here is the script which I wrote to toggle the inverse feature on and off.


invStatus=$(gsettings get org.gnome.desktop.a11y.magnifier invert-lightness)

if [[ "${invStatus}" == "false" ]]
gsettings set org.gnome.desktop.a11y.magnifier invert-lightness true
gsettings set org.gnome.desktop.a11y.magnifier invert-lightness false

Here is how to make use of this simple, humble little script:

1. Copy the script (excluding the BEGIN and END segments).
2. Paste it into a text file.
3. Save the text file as or whatever you prefer, so long as the file has a ".sh" extension. Take note of the directory in which you saved the file. 4. Open up a terminal, change to the directory in which you saved your script, and enter the following command:

chmod +x

...where "toggle-invert" would be the name of your script file.

5. Press ALT+F2 and type in the following command followed by pressing the ENTER key:

gnome-control-center keyboard

6. Under the Shortcuts tab of the Keyboard window which opens, click on the "Custom Shortcuts" category.
7. Click on the PLUS ("+") button to add a custom shortcut.
8. Name the shortcut whatever you would prefer. I named mine "Toggle inverse". 9. In the Command field, type in the exact path to your script file. For instance, mine was /home/bob/
10. Click the Apply button.
11. Your custom shortcut should now appear on the list under the "Custom Shortcuts" category. Click on the field which is labelled "Disabled" and enter your preferred keyboard shortcut combination (I used ALT+SHIFT+I) to toggle the inverse feature on or off.

That should do it! This seems to be a good workaround for the time present.

I hope that this is helpful to someone.

Take care.
On 09/06/2013 01:46 PM, Joseph Scheuhammer wrote:
Hello Robert,

There is some information in the GNOME Help application regarding keyboard shortcuts. Launch the "Help" application and search topics using "Set keyboard shorcuts". That page contains general instructions for changing keyboard shortcuts. In particular, there is a section for defining custom keyboard shortcuts.

Here's one way to create a keyboard shortcut for reverse video, quoting from the help, and listing the commands needed:

To create your own keyboard shortcut:

1. Select Custom Shortcuts in the left pane, and click the + button (or click the + button in any category). The Custom Shortcut window will appear.

2. Type a Name to identify the shortcut, and a Command to run an application, then click Apply. For example, if you wanted the shortcut to open Rhythmbox, you could name it Music and use the rhythmbox command.

I chose "RevVideo" for the name, but you can call it what you want. The command is:

gsettings set org.gnome.desktop.a11y.magnifier invert-lightness true

3. Click Disabled in the row that was just added. When it changes to New accelerator..., hold down the desired shortcut key combination.

I chose Ctrl+Alt+R, but I didn't carefully check if that key combination was being used for anything else. But that worked for me -- when the magnifier is on, Ctrl+Alt+R switches the magnified view to reverse video.

A problem with the above is that it *only* turns inverse video on, but not off. I couldn't determine how to make it a true toggle. However, to compensate, I created a second custom shortcut to switch back to normal video. The command in that case is:

gsettings set org.gnome.desktop.a11y.magnifier invert-lightness false.

As for the rest of your questions, hopefully reading the help for keyboard shortcuts will provide insight.

Hope that helps.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]