Re: Orca on laptops.



> To play devil's advocate:  What about instances where folks are sharing
> the same computer but not using separate usernames, and not all of them
> are blind?  Okay so it's a stretch....  ;-)

Good question, and not really a stretch when you think about public use
information systems.   The Caps Lock behavior is only modified when you
run Orca, so users who don't use Orca should get the standard system
behavior.  Plus the standard system behavior is restored when X is
restarted.  

The only rub is this:  assume an Orca user goes to the library, runs
Orca on the electronic card catalog system, quits Orca, and then leaves.
The default Caps Lock key behavior won't work for the next user until
the X server is restarted.  I guess I could possibly imagine hearing
shouts come from the Hollis, NH, public library:

"Damn computer!  I'm looking for the enormously large collection of
books on 'GNOME', not 'gnome'.  Why doesn't this Caps Lock key work?  My
life is ruined.  Down with Orca users!  Kill them all!  They must die!
Take their babies, too!".

We hear similar things from maladjusted pinball game players who want to
kill everyone associated with AccessX.  

Here's a patch, however, that helps save the lives of innocent Orca
users.  It rolls in the previous patch and adds a little save/restore
logic to the script that starts orca.  It's not perfect, but it's
better.

Will

Index: orca/src/orca/orca.in
===================================================================
RCS file: /cvs/gnome/orca/src/orca/orca.in,v
retrieving revision 1.18
diff -p -u -r1.18 orca.in
--- orca/src/orca/orca.in	7 Sep 2006 19:44:52 -0000	1.18
+++ orca/src/orca/orca.in	9 Nov 2006 17:15:27 -0000
@@ -90,7 +90,16 @@ runOrca()
     exec_prefix= prefix@
     PYTHONPATH= pyexecdir@
     export PYTHONPATH
+
+    # We'll save and restore the Caps_Lock as a modifier just in case
+    # the user is using the Caps_Lock as the Orca modifier key.
+    #
+    CAPSLOCKSETTING=`xmodmap | grep Caps_Lock | cut -f1`
     @PYTHON@ -c "import orca.orca; orca.orca.main()" "$ARGS"
+    if [ "x$CAPSLOCKSETTING" != "x" ]
+    then
+	xmodmap -e "add $CAPSLOCKSETTING = Caps_Lock" 
+    fi
 }
 
 # Runs a watchdog process in the background.  It merely attempts to
Index: orca/src/orca/orca.py
===================================================================
RCS file: /cvs/gnome/orca/src/orca/orca.py,v
retrieving revision 1.165
diff -p -u -r1.165 orca.py
--- orca/src/orca/orca.py	7 Nov 2006 19:19:01 -0000	1.165
+++ orca/src/orca/orca.py	9 Nov 2006 17:15:27 -0000
@@ -857,6 +857,10 @@ def loadUserSettings(script=None, inputE
         debug.println(debug.LEVEL_CONFIGURATION,
                       "Magnification module has NOT been initialized.")
 
+    for keyName in settings.orcaModifierKeys:
+        if keyName == "Caps_Lock":
+            os.system('xmodmap -e "clear Lock"')
+
     _showMainWindowGUI()
 
     httpserver.init()


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