[orca] Some pre-gsettings-migration cleanup



commit 42aefdbab86205431a1b99ec0752e205c9ad44d9
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon May 26 15:06:24 2014 -0400

    Some pre-gsettings-migration cleanup

 po/POTFILES.in                                     |    1 -
 src/orca/acss.py                                   |    3 -
 src/orca/backends/json_backend.py                  |    2 +-
 src/orca/braille.py                                |   14 +-
 src/orca/chat.py                                   |   16 +-
 src/orca/common_keyboardmap.py                     |   18 +-
 src/orca/debug.py                                  |   11 +-
 src/orca/desktop_keyboardmap.py                    |   10 +-
 src/orca/event_manager.py                          |   62 +-
 src/orca/generator.py                              |    3 +-
 src/orca/input_event.py                            |   38 +-
 src/orca/keybindings.py                            |   39 +-
 src/orca/laptop_keyboardmap.py                     |   12 +-
 src/orca/messages.py                               |   31 +
 src/orca/orca.py                                   |   27 +-
 src/orca/orca_console_prefs.py                     |    5 -
 src/orca/orca_gui_commandlist.py                   |    2 +-
 src/orca/orca_gui_find.py                          |    2 +-
 src/orca/orca_gui_navlist.py                       |    2 +-
 src/orca/orca_gui_prefs.py                         |  186 +++---
 src/orca/orca_gui_profile.py                       |    2 +-
 src/orca/orca_state.py                             |   28 -
 src/orca/script_utilities.py                       |    5 +-
 src/orca/scripts/apps/gnome-mud/script.py          |    5 +-
 src/orca/scripts/apps/gnome-search-tool/script.py  |   16 +-
 src/orca/scripts/apps/soffice/script.py            |   26 +-
 src/orca/scripts/default.py                        |   28 +-
 src/orca/scripts/toolkits/Gecko/keymaps.py         |   18 +-
 src/orca/scripts/toolkits/Gecko/script.py          |    6 +-
 .../scripts/toolkits/WebKitGtk/script_utilities.py |    4 +-
 src/orca/settings.py                               |  782 ++++----------------
 src/orca/settings_manager.py                       |    2 +-
 src/orca/speech.py                                 |    2 +-
 src/orca/speechdispatcherfactory.py                |    4 +-
 src/orca/speechserver.py                           |    2 +-
 src/orca/structural_navigation.py                  |  154 ++--
 36 files changed, 564 insertions(+), 1004 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f85632c..b71a962 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -29,6 +29,5 @@ src/orca/scripts/apps/Thunderbird/speech_generator.py
 src/orca/scripts/default.py
 src/orca/scripts/toolkits/Gecko/braille_generator.py
 src/orca/scripts/toolkits/Gecko/script.py
-src/orca/settings.py
 src/orca/text_attribute_names.py
 src/orca/tutorialgenerator.py
diff --git a/src/orca/acss.py b/src/orca/acss.py
index 17e1b76..9712e2f 100644
--- a/src/orca/acss.py
+++ b/src/orca/acss.py
@@ -89,9 +89,6 @@ class ACSS(dict):
         """Update name if we delete a key."""
         dict.__delitem__(self, key)
 
-    def updateName(self):
-        """Update name based on settings."""
-
     def name(self):
         _name = 'acss-'
         names = list(self.keys())
diff --git a/src/orca/backends/json_backend.py b/src/orca/backends/json_backend.py
index ac37ba9..466279d 100644
--- a/src/orca/backends/json_backend.py
+++ b/src/orca/backends/json_backend.py
@@ -128,7 +128,7 @@ class Backend:
             if key == 'voices':
                 for voiceType, voiceDef in list(value.items()):
                     value[voiceType] = acss.ACSS(voiceDef)
-            if key not in settings.excludeKeys:
+            if key not in ['startingProfile', 'activeProfile']:
                 generalSettings[key] = value
         try:
             generalSettings['activeProfile'] = profileSettings['profile']
diff --git a/src/orca/braille.py b/src/orca/braille.py
index 2ef8a09..4a8f53d 100644
--- a/src/orca/braille.py
+++ b/src/orca/braille.py
@@ -656,14 +656,14 @@ class Text(Region):
         #
         stringLength = len(self.rawLine) - len(self.label)
         lineEndOffset = self.lineOffset + stringLength
-        regionMask = [settings.TEXT_ATTR_BRAILLE_NONE]*stringLength
+        regionMask = [settings.BRAILLE_UNDERLINE_NONE]*stringLength
 
         attrIndicator = settings.textAttributesBrailleIndicator
         selIndicator = settings.brailleSelectorIndicator
         linkIndicator = settings.brailleLinkIndicator
         script = orca_state.activeScript
 
-        if getLinkMask and linkIndicator != settings.BRAILLE_LINK_NONE:
+        if getLinkMask and linkIndicator != settings.BRAILLE_UNDERLINE_NONE:
             try:
                 hyperText = self.accessible.queryHypertext()
                 nLinks = hyperText.getNLinks()
@@ -692,14 +692,14 @@ class Text(Region):
                                                     offset, True)
                 if endOffset <= offset:
                     break
-                mask = settings.TEXT_ATTR_BRAILLE_NONE
+                mask = settings.BRAILLE_UNDERLINE_NONE
                 offset = endOffset
                 for attrib in attributes:
                     if enabledAttributes.get(attrib, '') != '':
                         if enabledAttributes[attrib] != attributes[attrib]:
                             mask = attrIndicator
                             break
-                if mask != settings.TEXT_ATTR_BRAILLE_NONE:
+                if mask != settings.BRAILLE_UNDERLINE_NONE:
                     maskStart = max(startOffset - self.lineOffset, 0)
                     maskEnd = min(endOffset - self.lineOffset, stringLength)
                     for i in range(maskStart, maskEnd):
@@ -1062,7 +1062,7 @@ def _realignViewport(string, focusOffset, cursorOffset):
     # viewport.
     #
     if (cursorOffset < 0) \
-       or (settings.brailleAlignmentStyle == settings.ALIGN_BRAILLE_BY_EDGE) \
+       or (settings.brailleAlignmentStyle == settings.BRAILLE_ALIGN_BY_EDGE) \
        or not (cursorOffset >= viewport[0]
                and cursorOffset < (viewport[0] + _displaySize[0])):
         pass
@@ -1087,12 +1087,12 @@ def _realignViewport(string, focusOffset, cursorOffset):
         # in between the margins.  The only time we go outside the
         # margins are when we are at the ends of the string.
         #
-        if settings.brailleAlignmentStyle == settings.ALIGN_BRAILLE_BY_MARGIN:
+        if settings.brailleAlignmentStyle == settings.BRAILLE_ALIGN_BY_MARGIN:
             if cursorOffset < leftMargin:
                 jump = cursorOffset - leftMargin
             elif cursorOffset > rightMargin:
                 jump = cursorOffset - rightMargin
-        elif settings.brailleAlignmentStyle == settings.ALIGN_BRAILLE_BY_WORD:
+        elif settings.brailleAlignmentStyle == settings.BRAILLE_ALIGN_BY_WORD:
             # When we align by word, we want to try to show complete
             # words at the edges of the braille display.  When we're
             # near the left edge, we'll try to start a word at the
diff --git a/src/orca/chat.py b/src/orca/chat.py
index 47c9336..e5ee478 100644
--- a/src/orca/chat.py
+++ b/src/orca/chat.py
@@ -308,7 +308,7 @@ class Chat:
         #
         self.messageKeys = \
             ["F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9"]
-        self.messageKeyModifier = settings.ORCA_MODIFIER_MASK
+        self.messageKeyModifier = keybindings.ORCA_MODIFIER_MASK
         self.inputEventHandlers = {}
         self.setupInputEventHandlers()
         self.keyBindings = self.getKeyBindings()
@@ -366,22 +366,22 @@ class Chat:
         keyBindings.add(
             keybindings.KeyBinding(
                 "",
-                settings.defaultModifierMask,
-                settings.NO_MODIFIER_MASK,
+                keybindings.defaultModifierMask,
+                keybindings.NO_MODIFIER_MASK,
                 self.inputEventHandlers["togglePrefixHandler"]))
 
         keyBindings.add(
             keybindings.KeyBinding(
                 "",
-                settings.defaultModifierMask,
-                settings.NO_MODIFIER_MASK,
+                keybindings.defaultModifierMask,
+                keybindings.NO_MODIFIER_MASK,
                 self.inputEventHandlers["toggleBuddyTypingHandler"]))
 
         keyBindings.add(
             keybindings.KeyBinding(
                 "",
-                settings.defaultModifierMask,
-                settings.NO_MODIFIER_MASK,
+                keybindings.defaultModifierMask,
+                keybindings.NO_MODIFIER_MASK,
                 self.inputEventHandlers["toggleMessageHistoriesHandler"]))
 
         for messageKey in self.messageKeys:
@@ -389,7 +389,7 @@ class Chat:
                 keybindings.KeyBinding(
                     messageKey,
                     self.messageKeyModifier,
-                    settings.ORCA_MODIFIER_MASK,
+                    keybindings.ORCA_MODIFIER_MASK,
                     self.inputEventHandlers["reviewMessage"]))
 
         return keyBindings
diff --git a/src/orca/common_keyboardmap.py b/src/orca/common_keyboardmap.py
index 80ee6c7..3ff0a1a 100644
--- a/src/orca/common_keyboardmap.py
+++ b/src/orca/common_keyboardmap.py
@@ -28,17 +28,17 @@ __date__      = "$Date$"
 __copyright__ = "Copyright (c) 2010-2011 The Orca Team"
 __license__   = "LGPL"
 
-from . import settings
+from . import keybindings
 
 # Storing values 
-defaultModifierMask = settings.defaultModifierMask
-ORCA_MODIFIER_MASK = settings.ORCA_MODIFIER_MASK
-NO_MODIFIER_MASK = settings.NO_MODIFIER_MASK
-ORCA_SHIFT_MODIFIER_MASK = settings.ORCA_SHIFT_MODIFIER_MASK
-ORCA_CTRL_MODIFIER_MASK = settings.ORCA_CTRL_MODIFIER_MASK
-ORCA_ALT_MODIFIER_MASK = settings.ORCA_ALT_MODIFIER_MASK
-ORCA_CTRL_ALT_MODIFIER_MASK = settings.ORCA_CTRL_ALT_MODIFIER_MASK
-SHIFT_ALT_MODIFIER_MASK = settings.SHIFT_ALT_MODIFIER_MASK
+defaultModifierMask = keybindings.defaultModifierMask
+ORCA_MODIFIER_MASK = keybindings.ORCA_MODIFIER_MASK
+NO_MODIFIER_MASK = keybindings.NO_MODIFIER_MASK
+ORCA_SHIFT_MODIFIER_MASK = keybindings.ORCA_SHIFT_MODIFIER_MASK
+ORCA_CTRL_MODIFIER_MASK = keybindings.ORCA_CTRL_MODIFIER_MASK
+ORCA_ALT_MODIFIER_MASK = keybindings.ORCA_ALT_MODIFIER_MASK
+ORCA_CTRL_ALT_MODIFIER_MASK = keybindings.ORCA_CTRL_ALT_MODIFIER_MASK
+SHIFT_ALT_MODIFIER_MASK = keybindings.SHIFT_ALT_MODIFIER_MASK
 
 keymap = (
 
diff --git a/src/orca/debug.py b/src/orca/debug.py
index 848794a..2eaeda7 100644
--- a/src/orca/debug.py
+++ b/src/orca/debug.py
@@ -35,8 +35,6 @@ import pyatspi
 import subprocess
 import sys
 
-from . import orca_state
-
 # Used to turn off all debugging.
 #
 LEVEL_OFF = 10000
@@ -118,6 +116,12 @@ debugFile = None
 eventDebugLevel  = LEVEL_FINEST
 eventDebugFilter = None
 
+# If True, we output debug information for the event queue.  We
+# use this in addition to log level to prevent debug logic from
+# bogging down event handling.
+#
+debugEventQueue = False
+
 # What module(s) should be traced if traceit is being used. By default
 # we'll just attend to ourself. (And by default, we will not enable
 # traceit.) Note that enabling this functionality will drag your system
@@ -163,6 +167,8 @@ TRACE_ROLES = []
 #
 TRACE_ONLY_PROCESSING_EVENTS = True
 
+objEvent = None
+
 def printException(level):
     """Prints out information regarding the current exception.
 
@@ -377,7 +383,6 @@ def _getFileAndModule(frame):
     return filename, module
 
 def _shouldTraceIt():
-    objEvent = orca_state.currentObjectEvent
     if not objEvent:
         return not TRACE_ONLY_PROCESSING_EVENTS
 
diff --git a/src/orca/desktop_keyboardmap.py b/src/orca/desktop_keyboardmap.py
index e8a55a4..2547843 100644
--- a/src/orca/desktop_keyboardmap.py
+++ b/src/orca/desktop_keyboardmap.py
@@ -28,13 +28,13 @@ __date__      = "$Date$"
 __copyright__ = "Copyright (c) 2010 Joanmarie Diggs, Mesar Hameed."
 __license__   = "LGPL"
 
-from . import settings
+from . import keybindings
 
 # Storing values 
-defaultModifierMask = settings.defaultModifierMask
-ORCA_MODIFIER_MASK = settings.ORCA_MODIFIER_MASK
-NO_MODIFIER_MASK = settings.NO_MODIFIER_MASK
-ORCA_SHIFT_MODIFIER_MASK = settings.ORCA_SHIFT_MODIFIER_MASK
+defaultModifierMask = keybindings.defaultModifierMask
+ORCA_MODIFIER_MASK = keybindings.ORCA_MODIFIER_MASK
+NO_MODIFIER_MASK = keybindings.NO_MODIFIER_MASK
+ORCA_SHIFT_MODIFIER_MASK = keybindings.ORCA_SHIFT_MODIFIER_MASK
 
 keymap = (
 
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index 571e473..8cc9d1a 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -35,14 +35,15 @@ from . import input_event
 from . import messages
 from . import orca_state
 from . import script_manager
-from . import settings
 
 _scriptManager = script_manager.getManager()
 
 class EventManager:
 
-    def __init__(self):
+    def __init__(self, asyncMode=True):
         debug.println(debug.LEVEL_FINEST, 'INFO: Initializing event manager')
+        debug.println(debug.LEVEL_FINEST, 'INFO: Async Mode is %s' % asyncMode)
+        self._asyncMode = asyncMode
         self._scriptListenerCounts = {}
         self.registry = pyatspi.Registry
         self._active = False
@@ -51,7 +52,11 @@ class EventManager:
         self._eventQueue     = queue.Queue(0)
         self._gidleId        = 0
         self._gidleLock      = threading.Lock()
-        self.noFocusTimestamp = 0.0
+        self._gilSleepTime = 0.00001
+        self._synchronousToolkits = ['VCL']
+        self._ignoredEvents = ['object:bounds-changed',
+                               'object:state-changed:defunct',
+                               'object:property-change:accessible-parent']
         debug.println(debug.LEVEL_FINEST, 'INFO: Event manager initialized')
 
     def activate(self):
@@ -75,16 +80,23 @@ class EventManager:
         self._scriptListenerCounts = {}
         debug.println(debug.LEVEL_FINEST, 'INFO: Event manager deactivated')
 
+    def ignoreEventTypes(self, eventTypeList):
+        for eventType in eventTypeList:
+            if not eventType in self._ignoredEvents:
+                self._ignoredEvents.append(eventType)
+
+    def unignoreEventTypes(self, eventTypeList):
+        for eventType in eventTypeList:
+            if eventType in self._ignoredEvents:
+                self._ignoredEvents.remove(eventType)
+
     def _ignore(self, event):
         """Returns True if this event should be ignored."""
 
         if not self._active:
             return True
 
-        ignoredList = ['object:state-changed:defunct',
-                       'object:property-change:accessible-parent']
-        ignoredList.extend(settings.ignoredEventsList)
-        if list(filter(event.type.startswith, ignoredList)):
+        if list(filter(event.type.startswith, self._ignoredEvents)):
             return True
 
         # This should ultimately be changed as there are valid reasons
@@ -96,7 +108,7 @@ class EventManager:
         return False
 
     def _addToQueue(self, event, asyncMode):
-        debugging = settings.debugEventQueue
+        debugging = debug.debugEventQueue
         if debugging:
             debug.println(debug.LEVEL_ALL, "           acquiring lock...")
         self._gidleLock.acquire()
@@ -112,14 +124,14 @@ class EventManager:
             debug.println(debug.LEVEL_ALL, "           ...put complete")
 
         if asyncMode and not self._gidleId:
-            if settings.gilSleepTime:
-                time.sleep(settings.gilSleepTime)
+            if self._gilSleepTime:
+                time.sleep(self._gilSleepTime)
             self._gidleId = GLib.idle_add(self._dequeue)
 
         if debugging:
             debug.println(debug.LEVEL_ALL, "           releasing lock...")
         self._gidleLock.release()
-        if settings.debugEventQueue:
+        if debug.debugEventQueue:
             debug.println(debug.LEVEL_ALL, "           ...released")
 
     def _queuePrintln(self, e, isEnqueue=True):
@@ -149,7 +161,7 @@ class EventManager:
         - e: an at-spi event.
         """
 
-        if settings.debugEventQueue:
+        if debug.debugEventQueue:
             if self._enqueueCount:
                 msg = "_enqueue entered before exiting (count = %d)" \
                     % self._enqueueCount
@@ -159,20 +171,20 @@ class EventManager:
         inputEvents = (input_event.KeyboardEvent, input_event.BrailleEvent)
         isObjectEvent = not isinstance(e, inputEvents)
         if isObjectEvent and self._ignore(e):
-            if settings.debugEventQueue:
+            if debug.debugEventQueue:
                 self._enqueueCount -= 1
             return
 
         self._queuePrintln(e)
 
-        asyncMode = settings.asyncMode
+        asyncMode = self._asyncMode
         if isObjectEvent:
             app = e.source.getApplication()
             try:
                 toolkitName = app.toolkitName
             except:
                 toolkitName = None
-            if toolkitName in settings.synchronousToolkits:
+            if toolkitName in self._synchronousToolkits:
                 asyncMode = False
             script = _scriptManager.getScript(app, e.source)
             script.eventCache[e.type] = (e, time.time())
@@ -181,7 +193,7 @@ class EventManager:
         if not asyncMode:
             self._dequeue()
 
-        if settings.debugEventQueue:
+        if debug.debugEventQueue:
             self._enqueueCount -= 1
 
     def _dequeue(self):
@@ -190,7 +202,7 @@ class EventManager:
 
         rerun = True
 
-        if settings.debugEventQueue:
+        if debug.debugEventQueue:
             debug.println(debug.LEVEL_ALL,
                           "event_manager._dequeue %d" % self._dequeueCount)
             self._dequeueCount += 1
@@ -202,7 +214,7 @@ class EventManager:
             if isinstance(event, inputEvents):
                 self._processInputEvent(event)
             else:
-                orca_state.currentObjectEvent = event
+                debug.objEvent = event
                 debugging = not debug.eventDebugFilter \
                             or debug.eventDebugFilter.match(event.type)
                 if debugging:
@@ -218,7 +230,7 @@ class EventManager:
                     debug.println(debug.eventDebugLevel,
                                   "^^^^^ PROCESS OBJECT EVENT %s ^^^^^\n" \
                                   % event.type)
-                orca_state.currentObjectEvent = None
+                debug.objEvent = None
 
             # [[[TODO: HACK - it would seem logical to only do this if we
             # discover the queue is empty, but this inroduces a hang for
@@ -226,22 +238,18 @@ class EventManager:
             # lock.  So...we do it here.]]]
             #
             try:
-                noFocus = \
-                    not orca_state.activeScript \
-                    or (not orca_state.locusOfFocus and \
-                        self.noFocusTimestamp != orca_state.noFocusTimestamp)
+                noFocus = not (orca_state.activeScript or orca_state.locusOfFocus)
             except:
                 noFocus = True
 
             self._gidleLock.acquire()
             if self._eventQueue.empty():
                 if noFocus:
-                    if settings.gilSleepTime:
-                        time.sleep(settings.gilSleepTime)
+                    if self._gilSleepTime:
+                        time.sleep(self._gilSleepTime)
                     fullMessage = messages.NO_FOCUS
                     defaultScript = _scriptManager.getDefaultScript()
                     defaultScript.presentMessage(fullMessage, '')
-                    self.noFocusTimestamp = orca_state.noFocusTimestamp
                 self._gidleId = 0
                 rerun = False # destroy and don't call again
             self._gidleLock.release()
@@ -253,7 +261,7 @@ class EventManager:
         except:
             debug.printException(debug.LEVEL_SEVERE)
 
-        if settings.debugEventQueue:
+        if debug.debugEventQueue:
             self._dequeueCount -= 1
             debug.println(debug.LEVEL_ALL,
                           "Leaving _dequeue. Count: %d" % self._dequeueCount)
diff --git a/src/orca/generator.py b/src/orca/generator.py
index 85e8f60..d109213 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -450,8 +450,7 @@ class Generator:
         if not args.get('mode', None):
             args['mode'] = self._mode
         args['stringType'] = 'readonly'
-        if settings.presentReadOnlyText \
-           and self._script.utilities.isReadOnlyTextArea(obj):
+        if self._script.utilities.isReadOnlyTextArea(obj):
             result.append(self._script.formatting.getString(**args))
         return result
 
diff --git a/src/orca/input_event.py b/src/orca/input_event.py
index ebb9ce7..0eb283d 100644
--- a/src/orca/input_event.py
+++ b/src/orca/input_event.py
@@ -32,6 +32,7 @@ import time
 import unicodedata
 
 from . import debug
+from . import keybindings
 from . import keynames
 from . import messages
 from . import orca_state
@@ -145,7 +146,7 @@ class KeyboardEvent(InputEvent):
         # conversion. [[[WDW - this is making assumptions about
         # mapping ASCII control characters to UTF-8.]]]
         #
-        if (self.modifiers & settings.CTRL_MODIFIER_MASK) \
+        if (self.modifiers & keybindings.CTRL_MODIFIER_MASK) \
             and (not self.is_text) and (len(self.event_string) == 1):
             value = ord(self.event_string[0])
             if value < 32:
@@ -183,6 +184,17 @@ class KeyboardEvent(InputEvent):
         if not self.isLockingKey():
             self.shouldEcho = self.shouldEcho and settings.enableKeyEcho
 
+    def __eq__(self, other):
+        if not other:
+            return False
+
+        if self.type == other.type \
+           and self.hw_code == other.hw_code \
+           and self.timestamp == other.timestamp:
+            return True
+
+        return False
+
     def toString(self):
         return ("KEYBOARDEVENT: type=%d\n" % self.type) \
             + ("                id=%d\n" % self.id) \
@@ -273,7 +285,7 @@ class KeyboardEvent(InputEvent):
 
         if self.keyval_name == "KP_0" \
            and "KP_Insert" in settings.orcaModifierKeys \
-           and self.modifiers & settings.SHIFT_MODIFIER_MASK:
+           and self.modifiers & keybindings.SHIFT_MODIFIER_MASK:
             return True
 
         return False
@@ -284,7 +296,7 @@ class KeyboardEvent(InputEvent):
         if orca_state.bypassNextCommand:
             return False
 
-        return self.modifiers & settings.ORCA_MODIFIER_MASK
+        return self.modifiers & keybindings.ORCA_MODIFIER_MASK
 
     def isPrintableKey(self):
         """Return True if this is a printable key."""
@@ -357,26 +369,6 @@ class KeyboardEvent(InputEvent):
 
         return keynames.getKeyName(self.event_string)
 
-    def ignoreDueToTimestamp(self):
-        """Returns True if the event should be ignored due to its timestamp,
-        which might be completely absent or suggest that this input event is
-        a duplicate."""
-
-        if not self.timestamp:
-            return True
-        if self.timestamp != orca_state.lastInputEventTimestamp:
-            return False
-        if not orca_state.lastInputEvent:
-            return False
-        if isinstance(self, MouseButtonEvent) \
-           or isinstance(orca_state.lastInputEvent, MouseButtonEvent):
-            return False
-        if self.hw_code == orca_state.lastInputEvent.hw_code \
-           and self.type == orca_state.lastInputEvent.type:
-            return True
-
-        return False
-
 class BrailleEvent(InputEvent):
 
     def __init__(self, event):
diff --git a/src/orca/keybindings.py b/src/orca/keybindings.py
index 019da49..800ed60 100644
--- a/src/orca/keybindings.py
+++ b/src/orca/keybindings.py
@@ -39,6 +39,37 @@ from .orca_i18n import _
 _keysymsCache = {}
 _keycodeCache = {}
 
+MODIFIER_ORCA = 8
+NO_MODIFIER_MASK              =  0
+ALT_MODIFIER_MASK             =  1 << pyatspi.MODIFIER_ALT
+CTRL_MODIFIER_MASK            =  1 << pyatspi.MODIFIER_CONTROL
+ORCA_MODIFIER_MASK            =  1 << MODIFIER_ORCA
+ORCA_ALT_MODIFIER_MASK        = (1 << MODIFIER_ORCA |
+                                 1 << pyatspi.MODIFIER_ALT)
+ORCA_CTRL_MODIFIER_MASK       = (1 << MODIFIER_ORCA |
+                                 1 << pyatspi.MODIFIER_CONTROL)
+ORCA_CTRL_ALT_MODIFIER_MASK   = (1 << MODIFIER_ORCA |
+                                 1 << pyatspi.MODIFIER_CONTROL |
+                                 1 << pyatspi.MODIFIER_ALT)
+ORCA_SHIFT_MODIFIER_MASK      = (1 << MODIFIER_ORCA |
+                                 1 << pyatspi.MODIFIER_SHIFT)
+SHIFT_MODIFIER_MASK           =  1 << pyatspi.MODIFIER_SHIFT
+SHIFT_ALT_MODIFIER_MASK       = (1 << pyatspi.MODIFIER_SHIFT |
+                                 1 << pyatspi.MODIFIER_ALT)
+CTRL_ALT_MODIFIER_MASK        = (1 << pyatspi.MODIFIER_CONTROL |
+                                 1 << pyatspi.MODIFIER_ALT)
+COMMAND_MODIFIER_MASK         = (1 << pyatspi.MODIFIER_ALT |
+                                 1 << pyatspi.MODIFIER_CONTROL |
+                                 1 << pyatspi.MODIFIER_META2 |
+                                 1 << pyatspi.MODIFIER_META3)
+NON_LOCKING_MODIFIER_MASK     = (1 << pyatspi.MODIFIER_SHIFT |
+                                 1 << pyatspi.MODIFIER_ALT |
+                                 1 << pyatspi.MODIFIER_CONTROL |
+                                 1 << pyatspi.MODIFIER_META2 |
+                                 1 << pyatspi.MODIFIER_META3 |
+                                 1 << MODIFIER_ORCA)
+defaultModifierMask = NON_LOCKING_MODIFIER_MASK
+
 def getKeycode(keysym):
     """Converts an XKeysym string (e.g., 'KP_Enter') to a keycode that
     should match the event.hw_code for key events.
@@ -102,7 +133,7 @@ def getModifierNames(mods):
     """
 
     text = ""
-    if mods & settings.ORCA_MODIFIER_MASK:
+    if mods & ORCA_MODIFIER_MASK:
         if settings.keyboardLayout == settings.GENERAL_KEYBOARD_LAYOUT_DESKTOP:
             # Translators: this is presented in a GUI to represent the
             # "insert" key when used as the Orca modifier.
@@ -135,17 +166,17 @@ def getModifierNames(mods):
         text += _("Meta2") + "+"
     #if mods & (1 << pyatspi.MODIFIER_META):
     #    text += _("Meta") + "+"
-    if mods & settings.ALT_MODIFIER_MASK:
+    if mods & ALT_MODIFIER_MASK:
         # Translators: this is presented in a GUI to represent the
         # "left alt" modifier.
         #
         text += _("Alt_L") + "+"
-    if mods & settings.CTRL_MODIFIER_MASK:
+    if mods & CTRL_MODIFIER_MASK:
         # Translators: this is presented in a GUI to represent the
         # "control" modifier.
         #
         text += _("Ctrl") + "+"
-    if mods & settings.SHIFT_MODIFIER_MASK:
+    if mods & SHIFT_MODIFIER_MASK:
         # Translators: this is presented in a GUI to represent the
         # "shift " modifier.
         #
diff --git a/src/orca/laptop_keyboardmap.py b/src/orca/laptop_keyboardmap.py
index 03bd9e8..d71e631 100644
--- a/src/orca/laptop_keyboardmap.py
+++ b/src/orca/laptop_keyboardmap.py
@@ -28,14 +28,14 @@ __date__      = "$Date$"
 __copyright__ = "Copyright (c) 2010 Joanmarie Diggs, Mesar Hameed."
 __license__   = "LGPL"
 
-from . import settings
+from . import keybindings
 
 # Storing values 
-defaultModifierMask = settings.defaultModifierMask
-ORCA_MODIFIER_MASK = settings.ORCA_MODIFIER_MASK
-NO_MODIFIER_MASK = settings.NO_MODIFIER_MASK
-ORCA_SHIFT_MODIFIER_MASK = settings.ORCA_SHIFT_MODIFIER_MASK
-ORCA_CTRL_MODIFIER_MASK = settings.ORCA_CTRL_MODIFIER_MASK
+defaultModifierMask = keybindings.defaultModifierMask
+ORCA_MODIFIER_MASK = keybindings.ORCA_MODIFIER_MASK
+NO_MODIFIER_MASK = keybindings.NO_MODIFIER_MASK
+ORCA_SHIFT_MODIFIER_MASK = keybindings.ORCA_SHIFT_MODIFIER_MASK
+ORCA_CTRL_MODIFIER_MASK = keybindings.ORCA_CTRL_MODIFIER_MASK
 
 keymap = (
     
diff --git a/src/orca/messages.py b/src/orca/messages.py
index ae7f902..7310d37 100644
--- a/src/orca/messages.py
+++ b/src/orca/messages.py
@@ -474,6 +474,23 @@ CONSOLE_SETUP_START = _("Screen reader setup.")
 # based setup.
 CONSOLE_SETUP_COMPLETE = _("Setup complete.  Press Return to continue.")
 
+DATE_FORMAT_LOCALE = "%x"
+DATE_FORMAT_NUMBERS_DM = "%d/%m"
+DATE_FORMAT_NUMBERS_MD = "%m/%d"
+DATE_FORMAT_NUMBERS_DMY = "%d/%m/%Y"
+DATE_FORMAT_NUMBERS_MDY = "%m/%d/%Y"
+DATE_FORMAT_NUMBERS_YMD = "%Y/%m/%d"
+DATE_FORMAT_FULL_DM = "%A, %-d %B"
+DATE_FORMAT_FULL_MD = "%A, %B %-d"
+DATE_FORMAT_FULL_DMY = "%A, %-d %B, %Y"
+DATE_FORMAT_FULL_MDY = "%A, %B %-d, %Y"
+DATE_FORMAT_FULL_YMD = "%Y. %B %-d, %A."
+DATE_FORMAT_ABBREVIATED_DM = "%a, %-d %b"
+DATE_FORMAT_ABBREVIATED_MD = "%a, %b %-d"
+DATE_FORMAT_ABBREVIATED_DMY = "%a, %-d %b, %Y"
+DATE_FORMAT_ABBREVIATED_MDY = "%a, %b %-d, %Y"
+DATE_FORMAT_ABBREVIATED_YMD = "%Y. %b %-d, %a."
+
 # Translators: The "default" button in a dialog box is the button that gets
 # activated when Enter is pressed anywhere within that dialog box.
 DEFAULT_BUTTON_IS = _("Default button is %s")
@@ -1558,6 +1575,20 @@ TEXT_SELECTED = C_("text", "selected")
 # lets them know.
 TEXT_UNSELECTED = C_("text", "unselected")
 
+TIME_FORMAT_LOCALE = "%X"
+TIME_FORMAT_24_HMS = "%H:%M:%S"
+TIME_FORMAT_24_HM  = "%H:%M"
+
+# Translators: Orca has a feature to speak the time when the user presses a
+# shortcut key. This is one of the alternative formats that the user may wish
+# it to be presented with.
+TIME_FORMAT_24_HMS_WITH_WORDS = _("%H hours, %M minutes and %S seconds.")
+
+# Translators: Orca has a feature to speak the time when the user presses a
+# shortcut key. This is one of the alternative formats that the user may wish
+# it to be presented with.
+TIME_FORMAT_24_HM_WITH_WORDS = _("%H hours and %M minutes.")
+
 # Translators: this is information about a unicode character reported to the
 # user.  The value is the unicode number value of this character in hex.
 UNICODE = _("Unicode %s")
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 0a15c63..f6b4781 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -60,6 +60,7 @@ except:
 from . import braille
 from . import debug
 from . import event_manager
+from . import keybindings
 from . import logger
 from . import messages
 from . import notification_messages
@@ -216,12 +217,17 @@ def _processKeyboardEvent(event):
     """
     global _orcaModifierPressed
 
-    # Weed out duplicate and otherwise bogus events.
     keyboardEvent = KeyboardEvent(event)
     debug.println(debug.LEVEL_FINE, keyboardEvent.toString())
-    if keyboardEvent.ignoreDueToTimestamp():
-        debug.println(debug.LEVEL_FINE, "IGNORING EVENT DUE TO TIMESTAMP")
-        return
+
+    # Weed out duplicate and otherwise bogus events.
+    # TODO - JD: Be sure these are the right values to return
+    if not keyboardEvent.timestamp:
+        debug.println(debug.LEVEL_FINE, "IGNORING EVENT: NO TIMESTAMP")
+        return False
+    if keyboardEvent == orca_state.lastInputEvent:
+        debug.println(debug.LEVEL_FINE, "IGNORING EVENT: DUPLICATE")
+        return False
 
     # Figure out what we've got.
     isOrcaModifier = keyboardEvent.isOrcaModifier()
@@ -229,10 +235,9 @@ def _processKeyboardEvent(event):
     if isOrcaModifier:
         _orcaModifierPressed = isPressedEvent
     if _orcaModifierPressed:
-        keyboardEvent.modifiers |= settings.ORCA_MODIFIER_MASK
+        keyboardEvent.modifiers |= keybindings.ORCA_MODIFIER_MASK
 
     # Update our state.
-    orca_state.lastInputEventTimestamp = event.timestamp
     orca_state.lastInputEvent = keyboardEvent
     if not keyboardEvent.isModifierKey():
         keyboardEvent.setClickCount()
@@ -619,7 +624,7 @@ def init(registry):
 
     return True
 
-def start(registry):
+def start(registry, cacheValues):
     """Starts Orca.
     """
 
@@ -637,11 +642,11 @@ def start(registry):
     if settings.timeoutCallback and (settings.timeoutTime > 0):
         signal.alarm(0)
 
-    if settings.cacheValues:
+    if cacheValues:
         pyatspi.setCacheLevel(pyatspi.CACHE_PROPERTIES)
 
     debug.println(debug.LEVEL_FINEST, 'INFO: Orca starting registry')
-    registry.start(gil=settings.useGILIdleHandler)
+    registry.start(gil=False)
 
 def die(exitCode=1):
     pid = os.getpid()
@@ -757,7 +762,7 @@ def abortOnSignal(signum, frame):
                   % signum)
     die(signum)
 
-def main():
+def main(cacheValues=True):
     """The main entry point for Orca.  The exit codes for Orca will
     loosely be based on signals, where the exit code will be the
     signal used to terminate Orca (if a signal was used).  Otherwise,
@@ -798,7 +803,7 @@ def main():
             setLocusOfFocus(None, window)
 
     try:
-        start(pyatspi.Registry) # waits until we stop the registry
+        start(pyatspi.Registry, cacheValues) # waits until we stop the registry
     except:
         die(EXIT_CODE_HANG)
     return 0
diff --git a/src/orca/orca_console_prefs.py b/src/orca/orca_console_prefs.py
index dea4bcb..2f06c21 100644
--- a/src/orca/orca_console_prefs.py
+++ b/src/orca/orca_console_prefs.py
@@ -100,11 +100,6 @@ def setupSpeech(prefsDict):
     global speechServerChoice
     global speechVoiceChoice
 
-    # Use this because callbacks in this setup can hang.
-    # TODO: Is this true still??
-    #
-    settings.enableSpeechCallbacks = False
-
     factories = speech.getSpeechServerFactories()
     if len(factories) == 0:
         print(messages.SPEECH_UNAVAILABLE)
diff --git a/src/orca/orca_gui_commandlist.py b/src/orca/orca_gui_commandlist.py
index 0099aed..51b31c4 100644
--- a/src/orca/orca_gui_commandlist.py
+++ b/src/orca/orca_gui_commandlist.py
@@ -92,7 +92,7 @@ class OrcaCommandListGUI:
     def showGUI(self):
         self._gui.show_all()
 
-        ts = orca_state.lastInputEventTimestamp
+        ts = orca_state.lastInputEvent.timestamp
         if ts == 0:
             ts = Gtk.get_current_event_time()
         self._gui.present_with_time(ts)
diff --git a/src/orca/orca_gui_find.py b/src/orca/orca_gui_find.py
index 03c9603..ffad748 100644
--- a/src/orca/orca_gui_find.py
+++ b/src/orca/orca_gui_find.py
@@ -77,7 +77,7 @@ class OrcaFindGUI(orca_gtkbuilder.GtkBuilderWrapper):
         """
 
         findDialog = self.get_widget("findDialog")
-        ts = orca_state.lastInputEventTimestamp
+        ts = orca_state.lastInputEvent.timestamp
         if ts == 0:
             ts = Gtk.get_current_event_time()
         findDialog.present_with_time(ts)
diff --git a/src/orca/orca_gui_navlist.py b/src/orca/orca_gui_navlist.py
index 6ccab0b..da08549 100644
--- a/src/orca/orca_gui_navlist.py
+++ b/src/orca/orca_gui_navlist.py
@@ -102,7 +102,7 @@ class OrcaNavListGUI:
 
     def showGUI(self):
         self._gui.show_all()
-        ts = orca_state.lastInputEventTimestamp
+        ts = orca_state.lastInputEvent.timestamp
         if ts == 0:
             ts = Gtk.get_current_event_time()
         self._gui.present_with_time(ts)
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index f675539..443f8de 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -1173,7 +1173,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
     def pronunciationFocusChange(self, widget, event, isFocused):
         """Callback for the pronunciation tree's focus-{in,out}-event signal."""
 
-        orca_state.usePronunciationDictionary = not isFocused
+        _settingsManager.setSetting('usePronunciationDictionary', not isFocused)
 
     def pronunciationCursorChanged(self, widget):
         """Set the search column in the pronunciation dictionary tree view
@@ -1332,78 +1332,78 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         sdtime = time.strftime
         ltime = time.localtime
         self.populateComboBox(combobox2,
-          [sdtime(settings.DATE_FORMAT_LOCALE, ltime()),
-           sdtime(settings.DATE_FORMAT_NUMBERS_DM, ltime()),
-           sdtime(settings.DATE_FORMAT_NUMBERS_MD, ltime()),
-           sdtime(settings.DATE_FORMAT_NUMBERS_DMY, ltime()),
-           sdtime(settings.DATE_FORMAT_NUMBERS_MDY, ltime()),
-           sdtime(settings.DATE_FORMAT_NUMBERS_YMD, ltime()),
-           sdtime(settings.DATE_FORMAT_FULL_DM, ltime()),
-           sdtime(settings.DATE_FORMAT_FULL_MD, ltime()),
-           sdtime(settings.DATE_FORMAT_FULL_DMY, ltime()),
-           sdtime(settings.DATE_FORMAT_FULL_MDY, ltime()),
-           sdtime(settings.DATE_FORMAT_FULL_YMD, ltime()),
-           sdtime(settings.DATE_FORMAT_ABBREVIATED_DM, ltime()),
-           sdtime(settings.DATE_FORMAT_ABBREVIATED_MD, ltime()),
-           sdtime(settings.DATE_FORMAT_ABBREVIATED_DMY, ltime()),
-           sdtime(settings.DATE_FORMAT_ABBREVIATED_MDY, ltime()),
-           sdtime(settings.DATE_FORMAT_ABBREVIATED_YMD, ltime())
+          [sdtime(messages.DATE_FORMAT_LOCALE, ltime()),
+           sdtime(messages.DATE_FORMAT_NUMBERS_DM, ltime()),
+           sdtime(messages.DATE_FORMAT_NUMBERS_MD, ltime()),
+           sdtime(messages.DATE_FORMAT_NUMBERS_DMY, ltime()),
+           sdtime(messages.DATE_FORMAT_NUMBERS_MDY, ltime()),
+           sdtime(messages.DATE_FORMAT_NUMBERS_YMD, ltime()),
+           sdtime(messages.DATE_FORMAT_FULL_DM, ltime()),
+           sdtime(messages.DATE_FORMAT_FULL_MD, ltime()),
+           sdtime(messages.DATE_FORMAT_FULL_DMY, ltime()),
+           sdtime(messages.DATE_FORMAT_FULL_MDY, ltime()),
+           sdtime(messages.DATE_FORMAT_FULL_YMD, ltime()),
+           sdtime(messages.DATE_FORMAT_ABBREVIATED_DM, ltime()),
+           sdtime(messages.DATE_FORMAT_ABBREVIATED_MD, ltime()),
+           sdtime(messages.DATE_FORMAT_ABBREVIATED_DMY, ltime()),
+           sdtime(messages.DATE_FORMAT_ABBREVIATED_MDY, ltime()),
+           sdtime(messages.DATE_FORMAT_ABBREVIATED_YMD, ltime())
           ])
 
         indexdate = DATE_FORMAT_LOCALE
         dateFormat = self.prefsDict["presentDateFormat"]
-        if dateFormat == settings.DATE_FORMAT_LOCALE:
+        if dateFormat == messages.DATE_FORMAT_LOCALE:
             indexdate = DATE_FORMAT_LOCALE
-        elif dateFormat == settings.DATE_FORMAT_NUMBERS_DM:
+        elif dateFormat == messages.DATE_FORMAT_NUMBERS_DM:
             indexdate = DATE_FORMAT_NUMBERS_DM
-        elif dateFormat == settings.DATE_FORMAT_NUMBERS_MD:
+        elif dateFormat == messages.DATE_FORMAT_NUMBERS_MD:
             indexdate = DATE_FORMAT_NUMBERS_MD
-        elif dateFormat == settings.DATE_FORMAT_NUMBERS_DMY:
+        elif dateFormat == messages.DATE_FORMAT_NUMBERS_DMY:
             indexdate = DATE_FORMAT_NUMBERS_DMY
-        elif dateFormat == settings.DATE_FORMAT_NUMBERS_MDY:
+        elif dateFormat == messages.DATE_FORMAT_NUMBERS_MDY:
             indexdate = DATE_FORMAT_NUMBERS_MDY
-        elif dateFormat == settings.DATE_FORMAT_NUMBERS_YMD:
+        elif dateFormat == messages.DATE_FORMAT_NUMBERS_YMD:
             indexdate = DATE_FORMAT_NUMBERS_YMD
-        elif dateFormat == settings.DATE_FORMAT_FULL_DM:
+        elif dateFormat == messages.DATE_FORMAT_FULL_DM:
             indexdate = DATE_FORMAT_FULL_DM
-        elif dateFormat == settings.DATE_FORMAT_FULL_MD:
+        elif dateFormat == messages.DATE_FORMAT_FULL_MD:
             indexdate = DATE_FORMAT_FULL_MD
-        elif dateFormat == settings.DATE_FORMAT_FULL_DMY:
+        elif dateFormat == messages.DATE_FORMAT_FULL_DMY:
             indexdate = DATE_FORMAT_FULL_DMY
-        elif dateFormat == settings.DATE_FORMAT_FULL_MDY:
+        elif dateFormat == messages.DATE_FORMAT_FULL_MDY:
             indexdate = DATE_FORMAT_FULL_MDY
-        elif dateFormat == settings.DATE_FORMAT_FULL_YMD:
+        elif dateFormat == messages.DATE_FORMAT_FULL_YMD:
             indexdate = DATE_FORMAT_FULL_YMD
-        elif dateFormat == settings.DATE_FORMAT_ABBREVIATED_DM:
+        elif dateFormat == messages.DATE_FORMAT_ABBREVIATED_DM:
             indexdate = DATE_FORMAT_ABBREVIATED_DM
-        elif dateFormat == settings.DATE_FORMAT_ABBREVIATED_MD:
+        elif dateFormat == messages.DATE_FORMAT_ABBREVIATED_MD:
             indexdate = DATE_FORMAT_ABBREVIATED_MD
-        elif dateFormat == settings.DATE_FORMAT_ABBREVIATED_DMY:
+        elif dateFormat == messages.DATE_FORMAT_ABBREVIATED_DMY:
             indexdate = DATE_FORMAT_ABBREVIATED_DMY
-        elif dateFormat == settings.DATE_FORMAT_ABBREVIATED_MDY:
+        elif dateFormat == messages.DATE_FORMAT_ABBREVIATED_MDY:
             indexdate = DATE_FORMAT_ABBREVIATED_MDY
-        elif dateFormat == settings.DATE_FORMAT_ABBREVIATED_YMD:
+        elif dateFormat == messages.DATE_FORMAT_ABBREVIATED_YMD:
             indexdate = DATE_FORMAT_ABBREVIATED_YMD
         combobox2.set_active (indexdate)
         
         combobox3 = self.get_widget("timeFormatCombo")
         self.populateComboBox(combobox3,
-          [sdtime(settings.TIME_FORMAT_LOCALE, ltime()),
-           sdtime(settings.TIME_FORMAT_24_HMS, ltime()),
-           sdtime(settings.TIME_FORMAT_24_HMS_WITH_WORDS, ltime()),
-           sdtime(settings.TIME_FORMAT_24_HM, ltime()),
-           sdtime(settings.TIME_FORMAT_24_HM_WITH_WORDS, ltime())])
+          [sdtime(messages.TIME_FORMAT_LOCALE, ltime()),
+           sdtime(messages.TIME_FORMAT_24_HMS, ltime()),
+           sdtime(messages.TIME_FORMAT_24_HMS_WITH_WORDS, ltime()),
+           sdtime(messages.TIME_FORMAT_24_HM, ltime()),
+           sdtime(messages.TIME_FORMAT_24_HM_WITH_WORDS, ltime())])
         indextime = TIME_FORMAT_LOCALE
         timeFormat = self.prefsDict["presentTimeFormat"]
-        if timeFormat == settings.TIME_FORMAT_LOCALE:
+        if timeFormat == messages.TIME_FORMAT_LOCALE:
             indextime = TIME_FORMAT_LOCALE
-        elif timeFormat == settings.TIME_FORMAT_24_HMS:
+        elif timeFormat == messages.TIME_FORMAT_24_HMS:
             indextime = TIME_FORMAT_24_HMS
-        elif timeFormat == settings.TIME_FORMAT_24_HMS_WITH_WORDS:
+        elif timeFormat == messages.TIME_FORMAT_24_HMS_WITH_WORDS:
             indextime = TIME_FORMAT_24_HMS_WITH_WORDS
-        elif timeFormat == settings.TIME_FORMAT_24_HM:
+        elif timeFormat == messages.TIME_FORMAT_24_HM:
             indextime = TIME_FORMAT_24_HM
-        elif timeFormat == settings.TIME_FORMAT_24_HM_WITH_WORDS:
+        elif timeFormat == messages.TIME_FORMAT_24_HM_WITH_WORDS:
             indextime = TIME_FORMAT_24_HM_WITH_WORDS
         combobox3.set_active (indextime)
 
@@ -1478,21 +1478,21 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
             self.get_widget("brailleVerboseButton").set_active(True)
 
         selectionIndicator = prefs["brailleSelectorIndicator"]
-        if selectionIndicator == settings.BRAILLE_SEL_7:
+        if selectionIndicator == settings.BRAILLE_UNDERLINE_7:
             self.get_widget("brailleSelection7Button").set_active(True)
-        elif selectionIndicator == settings.BRAILLE_SEL_8:
+        elif selectionIndicator == settings.BRAILLE_UNDERLINE_8:
             self.get_widget("brailleSelection8Button").set_active(True)
-        elif selectionIndicator == settings.BRAILLE_SEL_BOTH:
+        elif selectionIndicator == settings.BRAILLE_UNDERLINE_BOTH:
             self.get_widget("brailleSelectionBothButton").set_active(True)
         else:
             self.get_widget("brailleSelectionNoneButton").set_active(True)
 
         linkIndicator = prefs["brailleLinkIndicator"]
-        if linkIndicator == settings.BRAILLE_LINK_7:
+        if linkIndicator == settings.BRAILLE_UNDERLINE_7:
             self.get_widget("brailleLink7Button").set_active(True)
-        elif linkIndicator == settings.BRAILLE_LINK_8:
+        elif linkIndicator == settings.BRAILLE_UNDERLINE_8:
             self.get_widget("brailleLink8Button").set_active(True)
-        elif linkIndicator == settings.BRAILLE_LINK_BOTH:
+        elif linkIndicator == settings.BRAILLE_UNDERLINE_BOTH:
             self.get_widget("brailleLinkBothButton").set_active(True)
         else:
             self.get_widget("brailleLinkNoneButton").set_active(True)
@@ -1525,11 +1525,11 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         self._createTextAttributesTreeView()
 
         brailleIndicator = prefs["textAttributesBrailleIndicator"]
-        if brailleIndicator == settings.TEXT_ATTR_BRAILLE_7:
+        if brailleIndicator == settings.BRAILLE_UNDERLINE_7:
             self.get_widget("textBraille7Button").set_active(True)
-        elif brailleIndicator == settings.TEXT_ATTR_BRAILLE_8:
+        elif brailleIndicator == settings.BRAILLE_UNDERLINE_8:
             self.get_widget("textBraille8Button").set_active(True)
-        elif brailleIndicator == settings.TEXT_ATTR_BRAILLE_BOTH:
+        elif brailleIndicator == settings.BRAILLE_UNDERLINE_BOTH:
             self.get_widget("textBrailleBothButton").set_active(True)
         else:
             self.get_widget("textBrailleNoneButton").set_active(True)
@@ -1681,7 +1681,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
                                    modifierMask,
                                    0)
 
-        ts = orca_state.lastInputEventTimestamp
+        ts = orca_state.lastInputEvent.timestamp
         if ts == 0:
             ts = Gtk.get_current_event_time()
         orcaSetupWindow.present_with_time(ts)
@@ -2208,16 +2208,16 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         if widget.get_active():
             if widget.get_label() == guilabels.BRAILLE_DOT_7:
                 self.prefsDict["brailleSelectorIndicator"] = \
-                    settings.BRAILLE_SEL_7
+                    settings.BRAILLE_UNDERLINE_7
             elif widget.get_label() == guilabels.BRAILLE_DOT_8:
                 self.prefsDict["brailleSelectorIndicator"] = \
-                    settings.BRAILLE_SEL_8
+                    settings.BRAILLE_UNDERLINE_8
             elif widget.get_label() == guilabels.BRAILLE_DOT_7_8:
                 self.prefsDict["brailleSelectorIndicator"] = \
-                    settings.BRAILLE_SEL_BOTH
+                    settings.BRAILLE_UNDERLINE_BOTH
             else:
                 self.prefsDict["brailleSelectorIndicator"] = \
-                    settings.BRAILLE_SEL_NONE
+                    settings.BRAILLE_UNDERLINE_NONE
 
     def brailleLinkChanged(self, widget):
         """Signal handler for the "toggled" signal for the
@@ -2236,16 +2236,16 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         if widget.get_active():
             if widget.get_label() == guilabels.BRAILLE_DOT_7:
                 self.prefsDict["brailleLinkIndicator"] = \
-                    settings.BRAILLE_LINK_7
+                    settings.BRAILLE_UNDERLINE_7
             elif widget.get_label() == guilabels.BRAILLE_DOT_8:
                 self.prefsDict["brailleLinkIndicator"] = \
-                    settings.BRAILLE_LINK_8
+                    settings.BRAILLE_UNDERLINE_8
             elif widget.get_label() == guilabels.BRAILLE_DOT_7_8:
                 self.prefsDict["brailleLinkIndicator"] = \
-                    settings.BRAILLE_LINK_BOTH
+                    settings.BRAILLE_UNDERLINE_BOTH
             else:
                 self.prefsDict["brailleLinkIndicator"] = \
-                    settings.BRAILLE_LINK_NONE
+                    settings.BRAILLE_UNDERLINE_NONE
 
     def brailleIndicatorChanged(self, widget):
         """Signal handler for the "toggled" signal for the
@@ -2263,16 +2263,16 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         if widget.get_active():
             if widget.get_label() == guilabels.BRAILLE_DOT_7:
                 self.prefsDict["textAttributesBrailleIndicator"] = \
-                    settings.TEXT_ATTR_BRAILLE_7
+                    settings.BRAILLE_UNDERLINE_7
             elif widget.get_label() == guilabels.BRAILLE_DOT_8:
                 self.prefsDict["textAttributesBrailleIndicator"] = \
-                    settings.TEXT_ATTR_BRAILLE_8
+                    settings.BRAILLE_UNDERLINE_8
             elif widget.get_label() == guilabels.BRAILLE_DOT_7_8:
                 self.prefsDict["textAttributesBrailleIndicator"] = \
-                    settings.TEXT_ATTR_BRAILLE_BOTH
+                    settings.BRAILLE_UNDERLINE_BOTH
             else:
                 self.prefsDict["textAttributesBrailleIndicator"] = \
-                    settings.TEXT_ATTR_BRAILLE_NONE
+                    settings.BRAILLE_UNDERLINE_NONE
 
     def punctuationLevelChanged(self, widget):
         """Signal handler for the "toggled" signal for the noneButton,
@@ -2363,37 +2363,37 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
         dateFormatCombo = widget.get_active()
         if dateFormatCombo == DATE_FORMAT_LOCALE:
-            newFormat = settings.DATE_FORMAT_LOCALE
+            newFormat = messages.DATE_FORMAT_LOCALE
         elif dateFormatCombo == DATE_FORMAT_NUMBERS_DM:
-            newFormat = settings.DATE_FORMAT_NUMBERS_DM
+            newFormat = messages.DATE_FORMAT_NUMBERS_DM
         elif dateFormatCombo == DATE_FORMAT_NUMBERS_MD:
-            newFormat = settings.DATE_FORMAT_NUMBERS_MD
+            newFormat = messages.DATE_FORMAT_NUMBERS_MD
         elif dateFormatCombo == DATE_FORMAT_NUMBERS_DMY:
-            newFormat = settings.DATE_FORMAT_NUMBERS_DMY
+            newFormat = messages.DATE_FORMAT_NUMBERS_DMY
         elif dateFormatCombo == DATE_FORMAT_NUMBERS_MDY:
-            newFormat = settings.DATE_FORMAT_NUMBERS_MDY
+            newFormat = messages.DATE_FORMAT_NUMBERS_MDY
         elif dateFormatCombo == DATE_FORMAT_NUMBERS_YMD:
-            newFormat = settings.DATE_FORMAT_NUMBERS_YMD
+            newFormat = messages.DATE_FORMAT_NUMBERS_YMD
         elif dateFormatCombo == DATE_FORMAT_FULL_DM:
-            newFormat = settings.DATE_FORMAT_FULL_DM
+            newFormat = messages.DATE_FORMAT_FULL_DM
         elif dateFormatCombo == DATE_FORMAT_FULL_MD:
-            newFormat = settings.DATE_FORMAT_FULL_MD
+            newFormat = messages.DATE_FORMAT_FULL_MD
         elif dateFormatCombo == DATE_FORMAT_FULL_DMY:
-            newFormat = settings.DATE_FORMAT_FULL_DMY
+            newFormat = messages.DATE_FORMAT_FULL_DMY
         elif dateFormatCombo == DATE_FORMAT_FULL_MDY:
-            newFormat = settings.DATE_FORMAT_FULL_MDY
+            newFormat = messages.DATE_FORMAT_FULL_MDY
         elif dateFormatCombo == DATE_FORMAT_FULL_YMD:
-            newFormat = settings.DATE_FORMAT_FULL_YMD
+            newFormat = messages.DATE_FORMAT_FULL_YMD
         elif dateFormatCombo == DATE_FORMAT_ABBREVIATED_DM:
-            newFormat = settings.DATE_FORMAT_ABBREVIATED_DM
+            newFormat = messages.DATE_FORMAT_ABBREVIATED_DM
         elif dateFormatCombo == DATE_FORMAT_ABBREVIATED_MD:
-            newFormat = settings.DATE_FORMAT_ABBREVIATED_MD
+            newFormat = messages.DATE_FORMAT_ABBREVIATED_MD
         elif dateFormatCombo == DATE_FORMAT_ABBREVIATED_DMY:
-            newFormat = settings.DATE_FORMAT_ABBREVIATED_DMY
+            newFormat = messages.DATE_FORMAT_ABBREVIATED_DMY
         elif dateFormatCombo == DATE_FORMAT_ABBREVIATED_MDY:
-            newFormat = settings.DATE_FORMAT_ABBREVIATED_MDY
+            newFormat = messages.DATE_FORMAT_ABBREVIATED_MDY
         elif dateFormatCombo == DATE_FORMAT_ABBREVIATED_YMD:
-            newFormat = settings.DATE_FORMAT_ABBREVIATED_YMD
+            newFormat = messages.DATE_FORMAT_ABBREVIATED_YMD
         self.prefsDict["presentDateFormat"] = newFormat
     
     def timeFormatChanged(self, widget):
@@ -2407,15 +2407,15 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
         timeFormatCombo = widget.get_active()
         if timeFormatCombo == TIME_FORMAT_LOCALE:
-            newFormat = settings.TIME_FORMAT_LOCALE
+            newFormat = messages.TIME_FORMAT_LOCALE
         elif timeFormatCombo == TIME_FORMAT_24_HMS:
-            newFormat = settings.TIME_FORMAT_24_HMS
+            newFormat = messages.TIME_FORMAT_24_HMS
         elif timeFormatCombo == TIME_FORMAT_24_HMS_WITH_WORDS:
-            newFormat = settings.TIME_FORMAT_24_HMS_WITH_WORDS
+            newFormat = messages.TIME_FORMAT_24_HMS_WITH_WORDS
         elif timeFormatCombo == TIME_FORMAT_24_HM:
-            newFormat = settings.TIME_FORMAT_24_HM
+            newFormat = messages.TIME_FORMAT_24_HM
         elif timeFormatCombo == TIME_FORMAT_24_HM_WITH_WORDS:
-            newFormat  = settings.TIME_FORMAT_24_HM_WITH_WORDS
+            newFormat  = messages.TIME_FORMAT_24_HM_WITH_WORDS
         self.prefsDict["presentTimeFormat"] =  newFormat
 
     def speechVerbosityChanged(self, widget):
@@ -2561,7 +2561,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
         orcaMods = settings.orcaModifierKeys
         if eventString in orcaMods:
-            self._capturedKey = ['', settings.ORCA_MODIFIER_MASK, 0]
+            self._capturedKey = ['', keybindings.ORCA_MODIFIER_MASK, 0]
             return False
 
         modifierKeys =  ['Alt_L', 'Alt_R', 'Control_L', 'Control_R',
@@ -2576,9 +2576,9 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
             return True
 
         string, modifiers, clickCount = self._capturedKey
-        isOrcaModifier = modifiers & settings.ORCA_MODIFIER_MASK
+        isOrcaModifier = modifiers & keybindings.ORCA_MODIFIER_MASK
         if isOrcaModifier:
-            eventState |= settings.ORCA_MODIFIER_MASK
+            eventState |= keybindings.ORCA_MODIFIER_MASK
             self._capturedKey = [eventString, eventState, clickCount + 1]
 
         return True
@@ -2600,7 +2600,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         if not keyName or keyName in ["Return", "Escape"]:
             return False
 
-        isOrcaModifier = modifiers & settings.ORCA_MODIFIER_MASK
+        isOrcaModifier = modifiers & keybindings.ORCA_MODIFIER_MASK
         if keyName in ["Delete", "BackSpace"] and not isOrcaModifier:
             editable.set_text("")
             self._presentMessage(messages.KB_DELETED)
@@ -2609,7 +2609,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
             return True
 
         self.newBinding = keybindings.KeyBinding(keyName,
-                                                 settings.defaultModifierMask,
+                                                 keybindings.defaultModifierMask,
                                                  modifiers,
                                                  None,
                                                  clickCount)
@@ -2664,11 +2664,11 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
         mods = mods & Gdk.ModifierType.MODIFIER_MASK
         if mods & (1 << pyatspi.MODIFIER_SHIFTLOCK) \
-           and mods & settings.ORCA_MODIFIER_MASK:
+           and mods & keybindings.ORCA_MODIFIER_MASK:
             mods ^= (1 << pyatspi.MODIFIER_SHIFTLOCK)
 
         treeModel.set(myiter,
-                      modMask, str(settings.defaultModifierMask),
+                      modMask, str(keybindings.defaultModifierMask),
                       modUsed, str(int(mods)),
                       key, string,
                       text, new_text,
diff --git a/src/orca/orca_gui_profile.py b/src/orca/orca_gui_profile.py
index e22ce09..06fe5ea 100644
--- a/src/orca/orca_gui_profile.py
+++ b/src/orca/orca_gui_profile.py
@@ -90,7 +90,7 @@ class OrcaProfileGUI(Gtk.Dialog):
         self.prefsDialog = prefsDialog
         self.profileEntry.set_text(self.profileString)
 
-        ts = orca_state.lastInputEventTimestamp
+        ts = orca_state.lastInputEvent.timestamp
         if ts == 0:
             ts = Gtk.get_current_event_time()
         self.present_with_time(ts)
diff --git a/src/orca/orca_state.py b/src/orca/orca_state.py
index b3279d6..42b5d9d 100644
--- a/src/orca/orca_state.py
+++ b/src/orca/orca_state.py
@@ -44,10 +44,6 @@ activeWindow = None
 #
 activeScript = None
 
-# The object event currently being processed.
-#
-currentObjectEvent = None
-
 # The "click" count. Used to determine if the user has double or triple
 # "clicked" a key.
 #
@@ -56,7 +52,6 @@ clickCount = 0
 # Used to capture keys to redefine key bindings by the user.
 #
 capturingKeys   = False
-lastCapturedKey = None
 
 # The last non-modifier key event received.
 #
@@ -72,27 +67,10 @@ lastInputEvent = None
 #
 bypassNextCommand = False
 
-# The last timestamp from a device event. Used to set focus for the Orca
-# configuration GUI.
-#
-lastInputEventTimestamp = 0
-
 # Records the last time a key was echoed.
 #
 lastKeyEchoTime = None
 
-# The time that the last "No focus" event occured.
-#
-noFocusTimestamp = 0.0
-
-# The last word spoken.
-#
-lastWord = ""
-
-# The last word examined for the misspelled indicator.
-#
-lastWordCheckedForSpelling = ""
-
 # The last searchQuery
 #
 searchQuery = None
@@ -102,12 +80,6 @@ searchQuery = None
 #
 learnModeEnabled = False
 
-# Whether we should use the pronunciation dictionary to help speak 
-# certain words. This will be True everywhere except when focus is 
-# in the Pronunciation Dictionary in the Orca Preferences dialog.
-#
-usePronunciationDictionary = True
-
 # Handle to the Orca Preferences Glade GUI object.
 #
 orcaOS = None
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 7838f0a..33e8ed2 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -1987,7 +1987,7 @@ class Utilities:
                      or (not self.isReadOnlyTextArea(orca_state.locusOfFocus) \
                          and (orca_state.locusOfFocus.getState().contains( \
                                   pyatspi.STATE_FOCUSABLE)))) \
-                and not (event.modifiers & settings.ORCA_CTRL_MODIFIER_MASK)
+                and not (event.modifiers & keybindings.ORCA_CTRL_MODIFIER_MASK)
 
     def wordAtCoords(self, acc, x, y):
         """Get the word at the given coords in the accessible.
@@ -2271,6 +2271,9 @@ class Utilities:
         dictionary.
         """
 
+        if not settings.usePronunciationDictionary:
+            return line
+
         newLine = ""
         words = self.WORDS_RE.split(line)
         newLine = ''.join(map(pronunciation_dict.getPronunciation, words))
diff --git a/src/orca/scripts/apps/gnome-mud/script.py b/src/orca/scripts/apps/gnome-mud/script.py
index 038779c..ddbf8c3 100644
--- a/src/orca/scripts/apps/gnome-mud/script.py
+++ b/src/orca/scripts/apps/gnome-mud/script.py
@@ -32,7 +32,6 @@ import orca.scripts.default as default
 import orca.input_event as input_event
 import orca.keybindings as keybindings
 import orca.orca_state as orca_state
-import orca.settings as settings
 import orca.speech as speech
 
 from orca.orca_i18n import _ # for gettext support
@@ -129,8 +128,8 @@ class Script(default.Script):
             keyBindings.add(
                 keybindings.KeyBinding(
                     messagekey,
-                    settings.defaultModifierMask,
-                    settings.ORCA_MODIFIER_MASK,
+                    keybindings.defaultModifierMask,
+                    keybindings.ORCA_MODIFIER_MASK,
                     self.inputEventHandlers["readPreviousMessageHandler"]))
 
         return keyBindings
diff --git a/src/orca/scripts/apps/gnome-search-tool/script.py 
b/src/orca/scripts/apps/gnome-search-tool/script.py
index a1c1dfc..52a30de 100644
--- a/src/orca/scripts/apps/gnome-search-tool/script.py
+++ b/src/orca/scripts/apps/gnome-search-tool/script.py
@@ -29,8 +29,8 @@ __license__   = "LGPL"
 
 import pyatspi
 
+import orca.event_manager as event_manager
 import orca.scripts.toolkits.gtk as gtk
-import orca.settings as settings
 
 ########################################################################
 #                                                                      #
@@ -48,29 +48,21 @@ class Script(gtk.Script):
         """
 
         gtk.Script.__init__(self, app)
-        self._savedIgnoredEventsList = []
         self._floodEvents = ['object:children-changed:add',
                              'object:property-change:accessible-name',
                              'object:text-changed:insert',
                              'object:text-changed:delete']
 
-    def activate(self):
-        self._savedIgnoredEventsList = settings.ignoredEventsList
-        gtk.Script.activate(self)
-
-    def deactivate(self):
-        settings.ignoredEventsList = self._savedIgnoredEventsList
-        gtk.Script.deactivate(self)
-
     def onShowingChanged(self, event):
         """Callback for object:state-changed:showing events."""
 
         obj = event.source
         if obj.getRole() == pyatspi.ROLE_ANIMATION:
+            _manager = event_manager.getManager()
             if event.detail1:
-                settings.ignoredEventsList.extend(self._floodEvents)
+                _manager.ignoreEventTypes(self._floodEvents)
             else:
-                settings.ignoredEventList = self._savedIgnoredEventsList
+                _manager.unignoreEventTypes(self._floodEvents)
             self.presentTitle(None)
             return
 
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index 54cc987..b79c2d2 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -176,39 +176,39 @@ class Script(default.Script):
         keyBindings.add(
             keybindings.KeyBinding(
                 "a",
-                settings.defaultModifierMask,
-                settings.ORCA_MODIFIER_MASK,
+                keybindings.defaultModifierMask,
+                keybindings.ORCA_MODIFIER_MASK,
                 self.inputEventHandlers["presentInputLineHandler"]))
 
         keyBindings.add(
             keybindings.KeyBinding(
                 "r",
-                settings.defaultModifierMask,
-                settings.ORCA_MODIFIER_MASK,
+                keybindings.defaultModifierMask,
+                keybindings.ORCA_MODIFIER_MASK,
                 self.inputEventHandlers["setDynamicColumnHeadersHandler"],
                 1))
 
         keyBindings.add(
             keybindings.KeyBinding(
                 "r",
-                settings.defaultModifierMask,
-                settings.ORCA_MODIFIER_MASK,
+                keybindings.defaultModifierMask,
+                keybindings.ORCA_MODIFIER_MASK,
                 self.inputEventHandlers["clearDynamicColumnHeadersHandler"],
                 2))
 
         keyBindings.add(
             keybindings.KeyBinding(
                 "c",
-                settings.defaultModifierMask,
-                settings.ORCA_MODIFIER_MASK,
+                keybindings.defaultModifierMask,
+                keybindings.ORCA_MODIFIER_MASK,
                 self.inputEventHandlers["setDynamicRowHeadersHandler"],
                 1))
 
         keyBindings.add(
             keybindings.KeyBinding(
                 "c",
-                settings.defaultModifierMask,
-                settings.ORCA_MODIFIER_MASK,
+                keybindings.defaultModifierMask,
+                keybindings.ORCA_MODIFIER_MASK,
                 self.inputEventHandlers["clearDynamicRowHeadersHandler"],
                 2))
 
@@ -663,8 +663,8 @@ class Script(default.Script):
             # But this will get us to speak the entire paragraph when navigation by
             # paragraph has occurred.
             event_string, mods = self.utilities.lastKeyAndModifiers()
-            isControlKey = mods & settings.CTRL_MODIFIER_MASK
-            isShiftKey = mods & settings.SHIFT_MODIFIER_MASK
+            isControlKey = mods & keybindings.CTRL_MODIFIER_MASK
+            isShiftKey = mods & keybindings.SHIFT_MODIFIER_MASK
             if event_string in ["Up", "Down"] and isControlKey and not isShiftKey:
                 if self.utilities.displayedText(newLocusOfFocus):
                     speech.speak(self.utilities.displayedText(newLocusOfFocus))
@@ -957,7 +957,7 @@ class Script(default.Script):
             keyString, mods = self.utilities.lastKeyAndModifiers()
             navKeys = ["Up", "Down", "Left", "Right", "Page_Up", "Page_Down",
                        "Home", "End", "N"]
-            wasCommand = mods & settings.COMMAND_MODIFIER_MASK
+            wasCommand = mods & keybindings.COMMAND_MODIFIER_MASK
             weToggledIt = wasCommand and keyString not in navKeys
         if weToggledIt:
             speech.speak(self.speechGenerator.generateSpeech(obj))
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 2d1ae54..8a80bfd 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -134,6 +134,9 @@ class Script(script.Script):
         #
         self.currentReviewContents = ""
 
+        self._lastWord = ""
+        self._lastWordCheckedForSpelling = ""
+
     def setupInputEventHandlers(self):
         """Defines InputEventHandler fields for this script that can be
         called by the key and braille bindings."""
@@ -909,6 +912,7 @@ class Script(script.Script):
 
         self.presentMessage(messages.LEARN_MODE_STOP)
         orca_state.learnModeEnabled = False
+        return True
 
     def listOrcaShortcuts(self, inputEvent=None):
         """Shows a simple gui listing Orca's bound commands."""
@@ -2357,7 +2361,7 @@ class Script(script.Script):
         announceState = False
         keyString, mods = self.utilities.lastKeyAndModifiers()
         if keyString == "space":
-            if mods & settings.CTRL_MODIFIER_MASK:
+            if mods & keybindings.CTRL_MODIFIER_MASK:
                 announceState = True
             else:
                 # If we are already selected and the user presses "space" again,
@@ -2567,7 +2571,7 @@ class Script(script.Script):
             character = event.any_data
 
         elif keyString == "Delete" \
-             or (keyString == "D" and mods & settings.CTRL_MODIFIER_MASK):
+             or (keyString == "D" and mods & keybindings.CTRL_MODIFIER_MASK):
             # Speak the character to the right of the caret after
             # the current right character has been deleted.
             #
@@ -2647,7 +2651,7 @@ class Script(script.Script):
             speakThis = orca_state.lastInputEvent.button == "2"
         else:
             keyString, mods = self.utilities.lastKeyAndModifiers()
-            wasCommand = mods & settings.COMMAND_MODIFIER_MASK
+            wasCommand = mods & keybindings.COMMAND_MODIFIER_MASK
             if not wasCommand and keyString in ["Return", "Tab", "space"] \
                and role == pyatspi.ROLE_TERMINAL \
                and event.any_data.strip():
@@ -2963,7 +2967,7 @@ class Script(script.Script):
         if not keyString:
             return
 
-        isControlKey = mods & settings.CTRL_MODIFIER_MASK
+        isControlKey = mods & keybindings.CTRL_MODIFIER_MASK
 
         if keyString in ["Up", "Down"]:
             self.sayLine(obj)
@@ -3398,7 +3402,7 @@ class Script(script.Script):
         # caret is (i.e. the selected character).
         #
         eventString, mods = self.utilities.lastKeyAndModifiers()
-        if (mods & settings.SHIFT_MODIFIER_MASK) \
+        if (mods & keybindings.SHIFT_MODIFIER_MASK) \
            and eventString in ["Right", "Down"]:
             offset -= 1
 
@@ -3516,7 +3520,7 @@ class Script(script.Script):
         text = obj.queryText()
         offset = text.caretOffset
         lastKey, mods = self.utilities.lastKeyAndModifiers()
-        lastWord = orca_state.lastWord
+        lastWord = self._lastWord
 
         [word, startOffset, endOffset] = \
             text.getTextAtOffset(offset,
@@ -3554,7 +3558,7 @@ class Script(script.Script):
         self.speakMisspelledIndicator(obj, startOffset)
 
         word = self.utilities.adjustForRepeats(word)
-        orca_state.lastWord = word
+        self._lastWord = word
         speech.speak(word, voice)
 
     def stopSpeechOnActiveDescendantChanged(self, event):
@@ -4021,8 +4025,8 @@ class Script(script.Script):
             return False
 
         eventStr, mods = self.utilities.lastKeyAndModifiers()
-        isControlKey = mods & settings.CTRL_MODIFIER_MASK
-        isShiftKey = mods & settings.SHIFT_MODIFIER_MASK
+        isControlKey = mods & keybindings.CTRL_MODIFIER_MASK
+        isShiftKey = mods & keybindings.SHIFT_MODIFIER_MASK
         selectedText = nSelections > 0
 
         line = None
@@ -4111,19 +4115,19 @@ class Script(script.Script):
                 text.getTextAtOffset(offset, pyatspi.TEXT_BOUNDARY_CHAR)
             if not charAndOffsets[0].strip() \
                or self.utilities.isWordDelimiter(charAndOffsets[0]):
-                orca_state.lastWordCheckedForSpelling = charAndOffsets[0]
+                self._lastWordCheckedForSpelling = charAndOffsets[0]
                 return
 
             wordAndOffsets = \
                 text.getTextAtOffset(offset, pyatspi.TEXT_BOUNDARY_WORD_START)
             if self.utilities.isWordMisspelled(obj, offset) \
-               and wordAndOffsets[0] != orca_state.lastWordCheckedForSpelling:
+               and wordAndOffsets[0] != self._lastWordCheckedForSpelling:
                 self.speakMessage(messages.MISSPELLED)
             # Store this word so that we do not continue to present the
             # presence of the red squiggly as the user arrows amongst
             # the characters.
             #
-            orca_state.lastWordCheckedForSpelling = wordAndOffsets[0]
+            self._lastWordCheckedForSpelling = wordAndOffsets[0]
 
     ############################################################################
     #                                                                          #
diff --git a/src/orca/scripts/toolkits/Gecko/keymaps.py b/src/orca/scripts/toolkits/Gecko/keymaps.py
index 5d940eb..60b3ec2 100644
--- a/src/orca/scripts/toolkits/Gecko/keymaps.py
+++ b/src/orca/scripts/toolkits/Gecko/keymaps.py
@@ -28,17 +28,17 @@ __date__      = "$Date$"
 __copyright__ = "Copyright (c) 2010 Joanmarie Diggs, Mesar Hameed."
 __license__   = "LGPL"
 
-import orca.settings as settings
+import orca.keybindings as keybindings
 
 # Storing values 
-defaultModifierMask = settings.defaultModifierMask
-ORCA_MODIFIER_MASK = settings.ORCA_MODIFIER_MASK
-NO_MODIFIER_MASK = settings.NO_MODIFIER_MASK
-ORCA_SHIFT_MODIFIER_MASK = settings.ORCA_SHIFT_MODIFIER_MASK
-ORCA_CTRL_MODIFIER_MASK = settings.ORCA_CTRL_MODIFIER_MASK
-CTRL_MODIFIER_MASK = settings.CTRL_MODIFIER_MASK
-ALT_MODIFIER_MASK = settings.ALT_MODIFIER_MASK
-SHIFT_MODIFIER_MASK = settings.SHIFT_MODIFIER_MASK
+defaultModifierMask = keybindings.defaultModifierMask
+ORCA_MODIFIER_MASK = keybindings.ORCA_MODIFIER_MASK
+NO_MODIFIER_MASK = keybindings.NO_MODIFIER_MASK
+ORCA_SHIFT_MODIFIER_MASK = keybindings.ORCA_SHIFT_MODIFIER_MASK
+ORCA_CTRL_MODIFIER_MASK = keybindings.ORCA_CTRL_MODIFIER_MASK
+CTRL_MODIFIER_MASK = keybindings.CTRL_MODIFIER_MASK
+ALT_MODIFIER_MASK = keybindings.ALT_MODIFIER_MASK
+SHIFT_MODIFIER_MASK = keybindings.SHIFT_MODIFIER_MASK
 
 # KeyBindings that use the arrow keys for navigating HTML content.
 arrowKeymap = (
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 123c655..b28ce20 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -1768,7 +1768,7 @@ class Script(default.Script):
         if keyboardEvent.event_string in ["Page_Up", "Page_Down"]:
             return False
 
-        if keyboardEvent.modifiers & settings.SHIFT_MODIFIER_MASK:
+        if keyboardEvent.modifiers & keybindings.SHIFT_MODIFIER_MASK:
             return False
 
         if self._loadingDocumentContent:
@@ -1820,7 +1820,7 @@ class Script(default.Script):
                and not self._autocompleteVisible:
                 weHandleIt = keyboardEvent.event_string in ["Up", "Down"]
 
-        elif keyboardEvent.modifiers & settings.ALT_MODIFIER_MASK:
+        elif keyboardEvent.modifiers & keybindings.ALT_MODIFIER_MASK:
             # Alt+Down Arrow is the Firefox command to expand/collapse the
             # *currently focused* combo box.  When Orca is controlling the
             # caret, it is possible to navigate into a combo box *without
@@ -1880,7 +1880,7 @@ class Script(default.Script):
         #
         if isinstance(orca_state.lastInputEvent, input_event.KeyboardEvent):
             mods = orca_state.lastInputEvent.modifiers
-            isOrcaKey = mods & settings.ORCA_MODIFIER_MASK
+            isOrcaKey = mods & keybindings.ORCA_MODIFIER_MASK
             if isOrcaKey:
                 return True
 
diff --git a/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py 
b/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
index 76f3e6e..0f8b5b2 100644
--- a/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
+++ b/src/orca/scripts/toolkits/WebKitGtk/script_utilities.py
@@ -31,7 +31,7 @@ import pyatspi
 import re
 
 import orca.script_utilities as script_utilities
-import orca.settings as settings
+import orca.keybindings as keybindings
 
 #############################################################################
 #                                                                           #
@@ -145,7 +145,7 @@ class Utilities(script_utilities.Utilities):
         else:
             if boundary == pyatspi.TEXT_BOUNDARY_CHAR:
                 key, mods = self.lastKeyAndModifiers()
-                if (mods & settings.SHIFT_MODIFIER_MASK) and key == 'Right':
+                if (mods & keybindings.SHIFT_MODIFIER_MASK) and key == 'Right':
                     offset -= 1
             segment, start, end = text.getTextAtOffset(offset, boundary)
 
diff --git a/src/orca/settings.py b/src/orca/settings.py
index 67b5e0e..93c56cc 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -29,12 +29,9 @@ __license__   = "LGPL"
 
 import pyatspi
 
+from . import messages
 from .acss import ACSS
-from .orca_i18n import _
-from .orca_i18n import C_
 
-# These are the settings that Orca supports the user customizing.
-#
 userCustomizableSettings = [
     "orcaModifierKeys",
     "enableSpeech",
@@ -61,7 +58,6 @@ userCustomizableSettings = [
     "enablePositionSpeaking",
     "enableBraille",
     "enableBrailleContext",
-    "enableBrailleGrouping",
     "disableBrailleEOL",
     "brailleEOLIndicator",
     "brailleVerbosityLevel",
@@ -95,7 +91,6 @@ userCustomizableSettings = [
     "largeObjectTextLength",
     "structuralNavigationEnabled",
     "wrappedStructuralNavigation",
-    "presentRequiredState",
     "brailleRequiredStateString",
     "speechRequiredStateString",
     "chatMessageVerbosity",
@@ -119,144 +114,46 @@ userCustomizableSettings = [
     "findResultsMinimumLength",
 ]
 
-excludeKeys = ["pronunciations",
-               "keybindings",
-               "startingProfile",
-               "activeProfile"]
+GENERAL_KEYBOARD_LAYOUT_DESKTOP = 1
+GENERAL_KEYBOARD_LAYOUT_LAPTOP  = 2
 
-# Profiles
-#
-startingProfile = ['Default', 'default']
-activeProfile = ['Default', 'default']
-profile = ['Default', 'default']
-
-# A list of keys that can serve as the Orca modifier key.  The list is
-# so we can provide better cross platform support (e.g., Sun keyboard
-# vs. PC-104 keyboard layouts).  When any of these keys is pressed,
-# the orca.MODIFIER_ORCA bit will be set in the 'modifiers' field of
-# a KeyboardEvent input event.  The keys are currently compared to the
-# event_string of a keyboard input event from AT-SPI.
-#
-# The initial set of modifier keys is dependant upon whether the user
-# has specified a desktop or a laptop keyboard layout.
-#
 DESKTOP_MODIFIER_KEYS = ["Insert", "KP_Insert"]
 LAPTOP_MODIFIER_KEYS  = ["Caps_Lock"]
-orcaModifierKeys      = DESKTOP_MODIFIER_KEYS
 
-# A new modifier to use (set by the press of any key in the
-# orcaModifierKeys list) to represent the Orca modifier.
-#
-MODIFIER_ORCA = 8
-
-# Verbosity levels (see setBrailleVerbosityLevel and
-# setSpeechVerbosityLevel).  These will have an impact on the various
-# individual verbosity levels for rolenames, accelerators, etc.
-#
 VERBOSITY_LEVEL_BRIEF   = 0
 VERBOSITY_LEVEL_VERBOSE = 1
-speechVerbosityLevel    = VERBOSITY_LEVEL_VERBOSE
-brailleVerbosityLevel   = VERBOSITY_LEVEL_VERBOSE
-flashVerbosityLevel     = VERBOSITY_LEVEL_VERBOSE
-messageVerbosityLevel   = VERBOSITY_LEVEL_VERBOSE
+
+BRAILLE_ALIGN_BY_EDGE   = 0
+BRAILLE_ALIGN_BY_MARGIN = 1
+BRAILLE_ALIGN_BY_WORD   = 2
+
+BRAILLE_UNDERLINE_NONE = 0x00 # 00000000
+BRAILLE_UNDERLINE_7    = 0x40 # 01000000
+BRAILLE_UNDERLINE_8    = 0x80 # 10000000
+BRAILLE_UNDERLINE_BOTH = 0xc0 # 11000000
 
 BRAILLE_ROLENAME_STYLE_SHORT = 0 # three letter abbreviations
 BRAILLE_ROLENAME_STYLE_LONG  = 1 # full rolename
-brailleRolenameStyle    = BRAILLE_ROLENAME_STYLE_LONG
 
-# Roles to force to be displayed even when the verbosity level
-# is not verbose.
-#
-brailleForceRoles = [pyatspi.ROLE_COMBO_BOX,
-                     pyatspi.ROLE_MENU,
-                     pyatspi.ROLE_TEAROFF_MENU_ITEM]
-
-# Braille Selection Indicator (see brailleSelectorIndicator).
-# The values represent the character to be used in the attrOr
-# field of brlAPI's writeStruct.
-#
-BRAILLE_SEL_NONE = 0x00 # 00000000
-BRAILLE_SEL_7    = 0x40 # 01000000
-BRAILLE_SEL_8    = 0x80 # 10000000
-BRAILLE_SEL_BOTH = 0xc0 # 11000000
-brailleSelectorIndicator = BRAILLE_SEL_BOTH
-
-# Braille Link Indicator (see brailleLinkIndicator).
-# The values represent the character to be used in the attrOr
-# field of brlAPI's writeStruct.
-#
-BRAILLE_LINK_NONE = 0x00 # 00000000
-BRAILLE_LINK_7    = 0x40 # 01000000
-BRAILLE_LINK_8    = 0x80 # 10000000
-BRAILLE_LINK_BOTH = 0xc0 # 11000000
-brailleLinkIndicator = BRAILLE_LINK_BOTH
-
-# Braille alignment styles.  These say how to align text on the
-# edges of the braille display.  The brailleAlignmentMargin value
-# says how close to the edge of the braille the display the cursor
-# cell can get.  The brailleMaximumJump says how far we can jump
-# the display when aligning by word.
-#
-ALIGN_BRAILLE_BY_EDGE   = 0
-ALIGN_BRAILLE_BY_MARGIN = 1
-ALIGN_BRAILLE_BY_WORD   = 2
-brailleAlignmentMargin  = 3
-brailleMaximumJump      = 8
-brailleAlignmentStyle   = ALIGN_BRAILLE_BY_EDGE
-
-# Speech punctuation levels (see verbalizePunctuationStyle).
-#
 PUNCTUATION_STYLE_NONE = 3
 PUNCTUATION_STYLE_SOME = 2
 PUNCTUATION_STYLE_MOST = 1
 PUNCTUATION_STYLE_ALL  = 0
-verbalizePunctuationStyle = PUNCTUATION_STYLE_MOST
 
-# Say All styles (see sayAllStyle).
-#
-SAYALL_STYLE_LINE     = 0
-SAYALL_STYLE_SENTENCE = 1
-sayAllStyle = SAYALL_STYLE_SENTENCE
-
-# Speech Dispatcher capitalization styles.
 CAPITALIZATION_STYLE_NONE  = "none"
 CAPITALIZATION_STYLE_SPELL = "spell"
 CAPITALIZATION_STYLE_ICON = "icon"
-capitalizationStyle = CAPITALIZATION_STYLE_NONE
-
-
-# The absolue amount to change the speech rate when
-# increasing or decreasing speech.  This is a numerical
-# value that represents an ACSS rate value.
-#
-speechRateDelta         = 5
 
-# The absolue amount to change the speech pitch when
-# increasing or decreasing pitch.  This is a numerical
-# value that represents an ACSS pitch value.
-#
-speechPitchDelta        = 0.5
-
-# If True, enable speech.
-#
-enableSpeech            = True
-enableSpeechCallbacks   = True
-
-# If True, speech has been temporarily silenced.
-#
-silenceSpeech           = False
+SAYALL_STYLE_LINE     = 0
+SAYALL_STYLE_SENTENCE = 1
 
-# If True, only text which is displayed on screen will be spoken
-# (roles, states, etc. will not be).
-#
-onlySpeakDisplayedText = False
+PROGRESS_BAR_ALL         = 0
+PROGRESS_BAR_APPLICATION = 1
+PROGRESS_BAR_WINDOW      = 2
 
-# Settings that apply to the particular speech engine to
-# use as well details on the default voices to use.
-#
-speechFactoryModules    = ["speechdispatcherfactory"]
-speechServerFactory     = "speechdispatcherfactory"
-speechServerInfo        = None # None means let the factory decide.
+CHAT_SPEAK_ALL             = 0
+CHAT_SPEAK_ALL_IF_FOCUSED  = 1
+CHAT_SPEAK_FOCUSED_CHANNEL = 2
 
 DEFAULT_VOICE           = "default"
 UPPERCASE_VOICE         = "uppercase"
@@ -278,166 +175,144 @@ voices = {
     SYSTEM_VOICE: ACSS({}),
 }
 
-# If True, enable speaking of speech indentation and justification.
-#
-enableSpeechIndentation = False
-
-# If True, enable braille.
-#
-enableBraille           = True
-
-# If True, add the hierarchical context of an object to the braille
-# line.  People with very large braille displays may want to set this
-# to False.
-#
-enableBrailleContext    = True
-
-# If True, enable the grouping of children on the braille display.
-# This is for things like displaying all items of a menu, tab list,
-# menu bar, etc., on a single line of the braille display.
-#
-enableBrailleGrouping   = False
-
-# If True, enable braille flash messages. Note that braille or braille
-# monitor will also need to be enabled for this setting to work.
-#
-enableFlashMessages     = True
-
-# The timeout (in milliseconds) to use for messages flashed in braille.
-#
-brailleFlashTime        = 5000
-
-# If True, flash messages should continue to be displayed until some
-# other message comes along, or the user presses a key.
-#
-flashIsPersistent       = False
-
-# If True, enable braille monitor.
-#
-enableBrailleMonitor    = False
-
-# if True, enable character echo.
-# Note that it is allowable for both enableEchoByCharacter and enableKeyEcho
-# to be True
-#
-enableEchoByCharacter   = False
-
-# if True, enable word echo.
-# Note that it is allowable for both enableEchoByWord and enableKeyEcho
-# to be True
-#
-enableEchoByWord        = False
-
-# if True, enable Sentence echo.
-# Note that it is allowable for both enableEchoByWord and enableEchoBySentence
-# to be True.
-#
-enableEchoBySentence    = False
-
-# If True, enable key echo.
-# Note that it is allowable for both enableEchoByWord and enableKeyEcho
-# to be True
-#
-enableKeyEcho           = True
-
-# If True and key echo is enabled, echo Alphanumeric and punctuation keys.
-#
-enablePrintableKeys     = True
-
-# If True and key echo is enabled, echo Modifier keys.
-#
-enableModifierKeys      = True
-
-# If True and key echo is enabled, echo Function keys.
-#
-enableFunctionKeys      = True
-
-# If True and key echo is enabled, echo Action keys.
-#
-enableActionKeys        = True
-
-# If True and key echo is enabled, echo Navigation keys.
-#
-enableNavigationKeys    = False
-
-# If True and key echo is enabled, echo Diacritical keys.
-#
-enableDiacriticalKeys   = False
-
-# If True, tutorial strings defined will be spoken.
-#
-enableTutorialMessages = False
-
-# If True, mnemonics will be spoken.
-#
-enableMnemonicSpeaking = False
-
-# If true, position indexes  will be spoken automaticaly
-#
-enablePositionSpeaking = False
-
-# If True, always present locking key state changes; if False, never present
-# locking key state changes. If None, make the decision based on Orca's normal
-# behavior.
-#
-presentLockingKeys = None
-
-# If True, ignore the directive in the autostart file which prevents the
-# main window from showing up.
-#
-overrideDisabledMainWindow = False
-
-# Whether the user wants tooltips presented or not.
-#
-presentToolTips = False
-
-# Keyboard layout options (see keyboardLayout).
-#
-GENERAL_KEYBOARD_LAYOUT_DESKTOP = 1
-GENERAL_KEYBOARD_LAYOUT_LAPTOP  = 2
-keyboardLayout                  = GENERAL_KEYBOARD_LAYOUT_DESKTOP
-
-# If True, speak blank lines.
-#
-speakBlankLines         = True
-
-# if True, process multi case strings as words.
-#
+# Profiles
+startingProfile = ['Default', 'default']
+activeProfile   = ['Default', 'default']
+profile         = ['Default', 'default']
+
+# Speech
+speechFactoryModules         = ["speechdispatcherfactory"]
+speechServerFactory          = "speechdispatcherfactory"
+speechServerInfo             = None # None means let the factory decide.
+enableSpeech                 = True
+silenceSpeech                = False
+enableTutorialMessages       = False
+enableMnemonicSpeaking       = False
+enablePositionSpeaking       = False
+enableSpeechIndentation      = False
+onlySpeakDisplayedText       = False
+presentToolTips              = False
+speakBlankLines              = True
+repeatCharacterLimit         = 4
+readTableCellRow             = True
+speakCellCoordinates         = True
+speakCellSpan                = True
+speakCellHeaders             = True
+speakSpreadsheetCoordinates  = True
 speakMultiCaseStringsAsWords = False
+useColorNames                = True
+usePronunciationDictionary   = True
+sayAllStyle                  = SAYALL_STYLE_SENTENCE
+capitalizationStyle          = CAPITALIZATION_STYLE_NONE
+verbalizePunctuationStyle    = PUNCTUATION_STYLE_MOST
+speechVerbosityLevel         = VERBOSITY_LEVEL_VERBOSE
+messageVerbosityLevel        = VERBOSITY_LEVEL_VERBOSE
+useExperimentalSpeechProsody = True
+enablePauseBreaks            = True
 
-# If True, reads all the table cells in the current row rather than just
-# the current one.
-#
-readTableCellRow    = True
+# Braille
+tty = 7
+enableBraille                  = True
+enableBrailleMonitor           = False
+enableBrailleContext           = True
+enableFlashMessages            = True
+brailleFlashTime               = 5000
+flashIsPersistent              = False
+enableContractedBraille        = False
+brailleContractionTable        = ''
+disableBrailleEOL              = False
+brailleEOLIndicator            = " $l"
+brailleTableCellDelimiter      = " "
+brailleRolenameStyle           = BRAILLE_ROLENAME_STYLE_LONG
+brailleSelectorIndicator       = BRAILLE_UNDERLINE_BOTH
+brailleLinkIndicator           = BRAILLE_UNDERLINE_BOTH
+textAttributesBrailleIndicator = BRAILLE_UNDERLINE_NONE
+brailleVerbosityLevel          = VERBOSITY_LEVEL_VERBOSE
+flashVerbosityLevel            = VERBOSITY_LEVEL_VERBOSE
+brailleAlignmentStyle          = BRAILLE_ALIGN_BY_EDGE
+brailleAlignmentMargin         = 3
+brailleMaximumJump             = 8
+brailleForceRoles              = [pyatspi.ROLE_COMBO_BOX,
+                                  pyatspi.ROLE_MENU,
+                                  pyatspi.ROLE_TEAROFF_MENU_ITEM]
+
+# Keyboard and Echo
+keyboardLayout               = GENERAL_KEYBOARD_LAYOUT_DESKTOP
+orcaModifierKeys             = DESKTOP_MODIFIER_KEYS
+doubleClickTimeout           = 0.5
+enableKeyEcho                = True
+enablePrintableKeys          = True
+enableModifierKeys           = True
+enableFunctionKeys           = True
+enableActionKeys             = True
+enableNavigationKeys         = False
+enableDiacriticalKeys        = False
+enableEchoByCharacter        = False
+enableEchoByWord             = False
+enableEchoBySentence         = False
+presentLockingKeys           = None
+
+# Mouse review
+enableMouseReview          = False
+mouseDwellDelay            = 0
+mouseDwellMaxDrift         = 3
+
+# Progressbars
+enableProgressBarUpdates   = True
+progressBarUpdateInterval  = 10
+progressBarVerbosity       = PROGRESS_BAR_APPLICATION
+
+# Structural navigation
+structuralNavigationEnabled = True
+skipBlankCells              = False
+largeObjectTextLength       = 75
+wrappedStructuralNavigation = True
+inferLiveRegions            = True
+ariaLandmarks = [
+    "application",
+    "article",
+    "banner",
+    "complementary",
+    "contentinfo",
+    "definition",
+    "directory",
+    "document",
+    "grid",
+    "log",
+    "main",
+    "menubar",
+    "navigation",
+    "note",
+    "region",
+    "search",
+    "secondary",
+    "seealso",
+    "status",
+]
 
-# If True, enable speaking of progress bar updates.
-#
-enableProgressBarUpdates = True
+# Chat
+chatMessageVerbosity       = CHAT_SPEAK_ALL
+chatSpeakRoomName          = False
+chatAnnounceBuddyTyping    = False
+chatRoomHistories          = False
 
-# The interval (in seconds) between speaking progress bar updates. A value
-# of zero means that progress bar updates should not be spoken at all.
-#
-progressBarUpdateInterval = 10
-
-# When progress bar updates should be spoken, assuming they are enabled.
-# ALL means that any progress bar update will be spoken. APPLICATION
-# means that progress bar updates from the active application will be
-# spoken, even if they are not in the active window. WINDOW means that
-# the progress bar must be contained in the active window in order to
-# be spoken. The default verbosity level is APPLICATION.
-#
-PROGRESS_BAR_ALL = 0
-PROGRESS_BAR_APPLICATION = 1
-PROGRESS_BAR_WINDOW = 2
-progressBarVerbosity = PROGRESS_BAR_APPLICATION
+# Spellcheck
+spellcheckSpellError = True
+spellcheckSpellSuggestion = True
+spellcheckPresentContext = True
 
-# Whether or not to present the 'read only' attribute of text areas
-# if we can detect they are read only or not.
-#
-presentReadOnlyText = True
+# Day and time
+presentDateFormat = messages.DATE_FORMAT_LOCALE
+presentTimeFormat = messages.TIME_FORMAT_LOCALE
+
+# App search support
+FIND_SPEAK_NONE = 0
+FIND_SPEAK_IF_LINE_CHANGED  = 1
+FIND_SPEAK_ALL = 2
+findResultsVerbosity = FIND_SPEAK_ALL
+findResultsMinimumLength = 4
 
 # The complete list of possible text attributes.
-#
 allTextAttributes = \
     "bg-color:; bg-full-height:; bg-stipple:; direction:; editable:; " \
     "family-name:; fg-color:; fg-stipple:; font-effect:none; indent:0; " \
@@ -456,7 +331,6 @@ allTextAttributes = \
 # other words, if the attribute for a given piece of text has that value,
 # it won't be spoken. If no value part is given, then that attribute will
 # always be spoken.
-
 enabledSpokenTextAttributes = \
     "size:; family-name:; weight:400; indent:0; underline:none; " \
     "strikethrough:false; justification:left; style:normal; " \
@@ -469,368 +343,22 @@ enabledSpokenTextAttributes = \
 # other words, if the attribute for a given piece of text has that value,
 # it won't be spoken. If no value part is given, then that attribute will
 # always be brailled.
-
 enabledBrailledTextAttributes = \
     "size:; family-name:; weight:400; indent:0; underline:none; " \
     "strikethrough:false; justification:left; style:normal; " \
     "text-spelling:none;"
 
-# Text Attributes Braille Indicator (see textAttributesBrailleIndicator).
-# The values represent the character to be used in the attrOr
-# field of brlAPI's writeStruct.
-#
-TEXT_ATTR_BRAILLE_NONE = 0x00 # 00000000
-TEXT_ATTR_BRAILLE_7    = 0x40 # 01000000
-TEXT_ATTR_BRAILLE_8    = 0x80 # 10000000
-TEXT_ATTR_BRAILLE_BOTH = 0xc0 # 11000000
-textAttributesBrailleIndicator = TEXT_ATTR_BRAILLE_NONE
-
-# The limit to enable a repeat character count to be spoken.
-# If set to 0, then there will be no repeat character count.
-# Each character will be spoken singularly (i.e. "dash dash
-# dash dash dash" instead of "five dash characters").
-# If the value is set to 1, 2 or 3 then it's treated as if it was
-# zero. In other words, no repeat character count is given.
-#
-repeatCharacterLimit = 4
-
-# Tags associated with ARIA landmarks.
-#
-ariaLandmarks = [
-    "application",
-    "article",
-    "banner",
-    "complementary",
-    "contentinfo",
-    "definition",
-    "directory",
-    "document",
-    "grid",
-    "log",
-    "main",
-    "menubar",
-    "navigation",
-    "note",
-    "region",
-    "search",
-    "secondary",
-    "seealso",
-    "status",
-]
-
-# Script developer feature.  If False, just the default script
-# will be used.  Helps determine difference between custom
-# scripts and the default script behavior.
-#
-enableCustomScripts     = True
-
 # Latent support to allow the user to override/define keybindings
-# and braille bindings.  Unsupported and undocumented for now.
+# and braille bindings. Unsupported and undocumented for now.
 # Use at your own risk.
 #
 keyBindingsMap          = {}
 brailleBindingsMap      = {}
 
-# Script developer feature.  If False, no AT-SPI object values
-# will be cached locally.  Helps determine if there might be a
-# problem related to the cache being out of sync with the real
-# objects.
-#
-cacheValues             = True
-cacheDescriptions       = True
-
-# Script developer feature.  If False, no AT-SPI objects
-# will be cached locally.  Helps determine if there might be a
-# problem related to the cache being out of sync with the real
-# objects.
-#
-cacheAccessibles        = True
-
-# If non-zero, we use time.sleep() in various places to attempt to
-# free up the global interpreter lock.  Take a look at the following
-# URLs for more information:
-#
-# http://mail.python.org/pipermail/python-list/2002-October/126632.html
-# http://twistedmatrix.com/pipermail/twisted-python/2005-July/011052.html
-# http://www.pyzine.com/Issue001/Section_Articles/ \
-#                                 article_ThreadingGlobalInterpreter.html
-#
-gilSleepTime            = 0.00001
-
-# The value of the 'gil' parameter in the call to pyatspi.Registry.start
-# See http://bugzilla.gnome.org/show_bug.cgi?id=576954.
-#
-useGILIdleHandler       = False
-
-# If True, use the gidle __blockPreventor() code in atspi.py.
-#
-useBlockPreventor       = False
-
-# If True, we handle events asynchronously - our normal mode of
-# queueing events and processing them later on the gidle thread.
-# If False, we handle events immediately - helpful for testing.
-#
-asyncMode               = True
-
-# A list of toolkits whose events we need to process synchronously.
-# This was originally added for the Java toolkit (see bug #531869), but
-# we put this here to allow more toolkits to be more easily added.
-#
-synchronousToolkits     = ['VCL']
-
-# If True, we output debug information for the event queue.  We
-# use this in addition to log level to prevent debug logic from
-# bogging down event handling.
-#
-debugEventQueue         = False
-
-# The timeout value (in seconds) and callback used to determine if
-# Orca has hung or not.  The only setting one should muck with here is
-# the timeoutTime unless you want to create a custom callback handler
-# for the timeout.  See braille.py, atspi.py, and orca.py:init for how
-# these are used.
-#
-timeoutTime             = 10   # a value of 0 means don't do hang checking
-timeoutCallback         = None # Set by orca.py:init to orca.timeout
-
-# Keyboard double-click period. If the same key is pressed within
-# this time period, it's considered to be a double-click and might
-# provide different functionality (for example, Numpad 5 double-click
-# spells the current word rather than speaks it).
-#
-doubleClickTimeout = 0.5
-
-# Available options indicating which chat messages Orca should speak.
-#
-CHAT_SPEAK_ALL             = 0
-CHAT_SPEAK_ALL_IF_FOCUSED  = 1
-CHAT_SPEAK_FOCUSED_CHANNEL = 2
-
-chatMessageVerbosity = CHAT_SPEAK_ALL
-
-# Whether we prefix chat room messages with the name of the chat room.
-#
-chatSpeakRoomName = False
-
-# Whether we announce when a buddy is typing.
-#
-chatAnnounceBuddyTyping = False
-
-# Whether we provide chat room specific message histories.
-#
-chatRoomHistories = False
-
-# This is a list of events that Orca should immediately drop and never look at.
-#
-ignoredEventsList = ['object:bounds-changed']
-
-# Listen to Live Region events.  Tells Gecko.onChildrenChanged() and
-# onTextInserted() event handlers to monitor these events for live region
-# changes.
-#
-inferLiveRegions = True
-
-# Contracted braille support.
-#
-enableContractedBraille = False
-
-# Contracted braille table.
-#
-brailleContractionTable = ''
-
-# Whether or not to speak the cell's coordinates when navigating
-# from cell to cell in a table.
-#
-speakCellCoordinates = True
-speakSpreadsheetCoordinates = True
-
-# Whether or not to speak the number of cells spanned by a cell
-# that occupies more than one row or column of a table.
-#
-speakCellSpan = True
-
-# Whether or not to announce the header that applies to the current
-# when navigating from cell to cell in a table.
-#
-speakCellHeaders = True
-
-# Whether blank cells should be skipped when navigating in a table
-# using table navigation commands.
-#
-skipBlankCells = False
-
-# The minimum size in characters to be considered a "large object"
-# or "chunk" for structural navigation.
-#
-largeObjectTextLength = 75
-
-# Whether to wrap around the document when structural navigation is used.
-wrappedStructuralNavigation = True
-
-# Report object under mouse.
-#
-enableMouseReview = False
-
-# Mouse dwell delay in milliseconds for mouse review mode.
-# If the value is zero, the review will be read time.
-#
-mouseDwellDelay = 0
-
-# Maximum allowed drift while pointer is dwelling in mouse review mode.
-#
-mouseDwellMaxDrift = 3
-
-# The different modifiers/modifier masks associated with keybindings
-#
-NO_MODIFIER_MASK              =  0
-ALT_MODIFIER_MASK             =  1 << pyatspi.MODIFIER_ALT
-CTRL_MODIFIER_MASK            =  1 << pyatspi.MODIFIER_CONTROL
-ORCA_MODIFIER_MASK            =  1 << MODIFIER_ORCA
-ORCA_ALT_MODIFIER_MASK        = (1 << MODIFIER_ORCA |
-                                 1 << pyatspi.MODIFIER_ALT)
-ORCA_CTRL_MODIFIER_MASK       = (1 << MODIFIER_ORCA |
-                                 1 << pyatspi.MODIFIER_CONTROL)
-ORCA_CTRL_ALT_MODIFIER_MASK   = (1 << MODIFIER_ORCA |
-                                 1 << pyatspi.MODIFIER_CONTROL |
-                                 1 << pyatspi.MODIFIER_ALT)
-ORCA_SHIFT_MODIFIER_MASK      = (1 << MODIFIER_ORCA |
-                                 1 << pyatspi.MODIFIER_SHIFT)
-SHIFT_MODIFIER_MASK           =  1 << pyatspi.MODIFIER_SHIFT
-SHIFT_ALT_MODIFIER_MASK       = (1 << pyatspi.MODIFIER_SHIFT |
-                                 1 << pyatspi.MODIFIER_ALT)
-CTRL_ALT_MODIFIER_MASK        = (1 << pyatspi.MODIFIER_CONTROL |
-                                 1 << pyatspi.MODIFIER_ALT)
-COMMAND_MODIFIER_MASK         = (1 << pyatspi.MODIFIER_ALT |
-                                 1 << pyatspi.MODIFIER_CONTROL |
-                                 1 << pyatspi.MODIFIER_META2 |
-                                 1 << pyatspi.MODIFIER_META3)
-NON_LOCKING_MODIFIER_MASK     = (1 << pyatspi.MODIFIER_SHIFT |
-                                 1 << pyatspi.MODIFIER_ALT |
-                                 1 << pyatspi.MODIFIER_CONTROL |
-                                 1 << pyatspi.MODIFIER_META2 |
-                                 1 << pyatspi.MODIFIER_META3 |
-                                 1 << MODIFIER_ORCA)
-ALL_BUT_NUMLOCK_MODIFIER_MASK = (1 << MODIFIER_ORCA |
-                                 1 << pyatspi.MODIFIER_SHIFT |
-                                 1 << pyatspi.MODIFIER_SHIFTLOCK |
-                                 1 << pyatspi.MODIFIER_CONTROL |
-                                 1 << pyatspi.MODIFIER_ALT |
-                                 1 << pyatspi.MODIFIER_META2 |
-                                 1 << pyatspi.MODIFIER_META3)
-
-# The 2nd parameter used when creating a keybinding refers to the
-# modifiers "we care about."  We typically care about all of the
-# modifiers which are not locking keys because we want to avoid
-# conflicts with other commands, such as Orca's command for moving
-# among headings (H) and the Help menu (Alt+H).
-#
-defaultModifierMask = NON_LOCKING_MODIFIER_MASK
-
-# Whether or not we should present objects with STATE_REQUIRED to
-# the user. Currently, this is only seen with ARIA widgets.
-#
-presentRequiredState = False
-
-
-
 # A dictionary where the keys are rolenames and the values are
 # filenames containing audio snippets.
-#
 sounds = {}
 
-
-
-# string to indicate end of printed line for braille displays:
-#
-disableBrailleEOL = False
-brailleEOLIndicator = " $l"
-
-
-# String for delimiters between table cells
-#
-brailleTableCellDelimiter = " "
-
-# This is for bug #585417 - Allow pauses to be inserted into speech
-# output. We're keeping it separate for now until we get the pauses
-# sorted out just right.
-#
-useExperimentalSpeechProsody = True
-
-# If True, whenever a 'pause' keyword is found in a speech formatting
-# string, any string being created will be sent to the speech synthesis
-# system immediately.  This is for bug #585417 and allows for some
-# adaptation to how different systems handle queued speech.  For example,
-# some introduce unnaturally long pauses between requests to speak.
-#
-enablePauseBreaks = True
-
-# Format directives to use in presentTime function.
-# By default we use the time format according to the current locale.
-# These format strings are passed to python's time.strftime function. To see
-# possible directives to embed in the format strings check:
-# http://docs.python.org/library/time.html#time.strftime
-#
-TIME_FORMAT_LOCALE = "%X"
-TIME_FORMAT_24_HMS = "%H:%M:%S"
-# Translators: Orca has a feature to speak the time
-# when the user presses a shortcut key.
-# This is one of the alternative formats that the 
-# user may wish to be presented with.
-#
-TIME_FORMAT_24_HMS_WITH_WORDS = _("%H hours, %M minutes and %S seconds.")
-TIME_FORMAT_24_HM = "%H:%M"
-# Translators: Orca has a feature to speak the time
-# when the user presses a shortcut key.
-# This is one of the alternative formats that the 
-# user may wish to be presented with.
-#
-TIME_FORMAT_24_HM_WITH_WORDS = _("%H hours and %M minutes.")
-TIME_FORMAT_CUSTOM = "%X"
-presentTimeFormat = TIME_FORMAT_LOCALE
-
-# Format directives to use in presentDate function.
-# By default we use the date format according to the current locale.
-# These format strings are passed to python's time.strftime function. To see
-# possible directives to embed in the format strings check:
-# http://docs.python.org/library/time.html#time.strftime
-#
-DATE_FORMAT_LOCALE = "%x"
-DATE_FORMAT_NUMBERS_DM = "%d/%m"
-DATE_FORMAT_NUMBERS_MD = "%m/%d"
-DATE_FORMAT_NUMBERS_DMY = "%d/%m/%Y"
-DATE_FORMAT_NUMBERS_MDY = "%m/%d/%Y"
-DATE_FORMAT_NUMBERS_YMD = "%Y/%m/%d"
-DATE_FORMAT_FULL_DM = "%A, %-d %B"
-DATE_FORMAT_FULL_MD = "%A, %B %-d"
-DATE_FORMAT_FULL_DMY = "%A, %-d %B, %Y"
-DATE_FORMAT_FULL_MDY = "%A, %B %-d, %Y"
-DATE_FORMAT_FULL_YMD = "%Y. %B %-d, %A."
-DATE_FORMAT_ABBREVIATED_DM = "%a, %-d %b"
-DATE_FORMAT_ABBREVIATED_MD = "%a, %b %-d"
-DATE_FORMAT_ABBREVIATED_DMY = "%a, %-d %b, %Y"
-DATE_FORMAT_ABBREVIATED_MDY = "%a, %b %-d, %Y"
-DATE_FORMAT_ABBREVIATED_YMD = "%Y. %b %-d, %a."
-
-# To keep Orca from spitting up upon launch.
-#
-DATE_FORMAT_WITH_LONG_NAMES = DATE_FORMAT_FULL_DMY
-DATE_FORMAT_WITH_SHORT_NAMES = DATE_FORMAT_ABBREVIATED_DMY
-
-presentDateFormat = DATE_FORMAT_LOCALE
-
-# Default tty to pass along to brlapi.
-tty = 7
-
-spellcheckSpellError = True
-spellcheckSpellSuggestion = True
-spellcheckPresentContext = True
-
-useColorNames = True
-
-FIND_SPEAK_NONE = 0
-FIND_SPEAK_IF_LINE_CHANGED  = 1
-FIND_SPEAK_ALL = 2
-findResultsVerbosity = FIND_SPEAK_ALL
-findResultsMinimumLength = 4
-
-structuralNavigationEnabled = True
+# TODO - JD: Is this still needed now that AT-SPI has its own timeout?
+timeoutTime             = 10   # a value of 0 means don't do hang checking
+timeoutCallback         = None # Set by orca.py:init to orca.timeout
diff --git a/src/orca/settings_manager.py b/src/orca/settings_manager.py
index e689a2f..b9ba804 100644
--- a/src/orca/settings_manager.py
+++ b/src/orca/settings_manager.py
@@ -402,7 +402,7 @@ class SettingsManager(object):
         self.profileGeneral = {}
 
         for key, value in list(general.items()):
-            if key in settings.excludeKeys:
+            if key in ['startingProfile', 'activeProfile']:
                 continue
             elif key == 'profile':
                 self.profileGeneral[key] = value
diff --git a/src/orca/speech.py b/src/orca/speech.py
index febc601..e63e2d3 100644
--- a/src/orca/speech.py
+++ b/src/orca/speech.py
@@ -155,7 +155,7 @@ def _speak(text, acss, interrupt):
 
     if settings.speakMultiCaseStringsAsWords:
         text = _processMultiCaseString(text)
-    if orca_state.activeScript and orca_state.usePronunciationDictionary:
+    if orca_state.activeScript:
         text = orca_state.activeScript.utilities.adjustForPronunciation(text)
     if settings.speakMultiCaseStringsAsWords:
         text = _processMultiCaseString(text)
diff --git a/src/orca/speechdispatcherfactory.py b/src/orca/speechdispatcherfactory.py
index cc4a45d..6b8f9a0 100644
--- a/src/orca/speechdispatcherfactory.py
+++ b/src/orca/speechdispatcherfactory.py
@@ -292,7 +292,7 @@ class SpeechServer(speechserver.SpeechServer):
         if isinstance(text, ACSS):
             text = ''
         text = self.__addVerbalizedPunctuation(text)
-        if orca_state.activeScript and orca_state.usePronunciationDictionary:
+        if orca_state.activeScript:
             text = orca_state.activeScript.\
                 utilities.adjustForPronunciation(text)
 
@@ -431,7 +431,7 @@ class SpeechServer(speechserver.SpeechServer):
             self._send_command(self._client.char, character)
             return
 
-        if orca_state.activeScript and orca_state.usePronunciationDictionary:
+        if orca_state.activeScript:
             name = orca_state.activeScript.\
                 utilities.adjustForPronunciation(name)
         self.speak(name, acss)
diff --git a/src/orca/speechserver.py b/src/orca/speechserver.py
index b70bddb..88f14d0 100644
--- a/src/orca/speechserver.py
+++ b/src/orca/speechserver.py
@@ -195,7 +195,7 @@ class SpeechServer(object):
             voice = ACSS(settings.voices[settings.DEFAULT_VOICE])
 
         event_string = event.getKeyName()
-        if orca_state.activeScript and orca_state.usePronunciationDictionary:
+        if orca_state.activeScript:
             event_string = orca_state.activeScript.\
                 utilities.adjustForPronunciation(event_string)
 
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index 13c55ae..27ba13c 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -184,7 +184,7 @@ class StructuralNavigationObject:
             self.keyBindings.add(
                 keybindings.KeyBinding(
                     keysymstring,
-                    settings.defaultModifierMask,
+                    keybindings.defaultModifierMask,
                     modifiers,
                     self.inputEventHandlers[handlerName]))
 
@@ -200,7 +200,7 @@ class StructuralNavigationObject:
             self.keyBindings.add(
                 keybindings.KeyBinding(
                     keysymstring,
-                    settings.defaultModifierMask,
+                    keybindings.defaultModifierMask,
                     modifiers,
                     self.inputEventHandlers[handlerName]))
 
@@ -216,7 +216,7 @@ class StructuralNavigationObject:
             self.keyBindings.add(
                 keybindings.KeyBinding(
                     keysymstring,
-                    settings.defaultModifierMask,
+                    keybindings.defaultModifierMask,
                     modifiers,
                     self.inputEventHandlers[handlerName]))
 
@@ -236,7 +236,7 @@ class StructuralNavigationObject:
             self.keyBindings.add(
                 keybindings.KeyBinding(
                     keysymstring,
-                    settings.defaultModifierMask,
+                    keybindings.defaultModifierMask,
                     modifiers,
                     self.inputEventHandlers[handlerName]))
 
@@ -255,7 +255,7 @@ class StructuralNavigationObject:
             self.keyBindings.add(
                 keybindings.KeyBinding(
                     keysymstring,
-                    settings.defaultModifierMask,
+                    keybindings.defaultModifierMask,
                     modifiers,
                     self.inputEventHandlers[handlerName]))
 
@@ -274,7 +274,7 @@ class StructuralNavigationObject:
             self.keyBindings.add(
                 keybindings.KeyBinding(
                     keysymstring,
-                    settings.defaultModifierMask,
+                    keybindings.defaultModifierMask,
                     modifiers,
                     self.inputEventHandlers[handlerName]))
 
@@ -305,7 +305,7 @@ class StructuralNavigationObject:
             self.keyBindings.add(
                 keybindings.KeyBinding(
                     keysymstring,
-                    settings.defaultModifierMask,
+                    keybindings.defaultModifierMask,
                     modifiers,
                     self.inputEventHandlers[handlerName]))
 
@@ -327,7 +327,7 @@ class StructuralNavigationObject:
         handler = input_event.InputEventHandler(function, description)
         keyBinding = keybindings.KeyBinding(
                          keysymstring,
-                         settings.defaultModifierMask,
+                         keybindings.defaultModifierMask,
                          modifiers,
                          handler)
 
@@ -685,8 +685,8 @@ class StructuralNavigation:
         keyBindings.add(
             keybindings.KeyBinding(
                 "z",
-                settings.defaultModifierMask,
-                settings.ORCA_MODIFIER_MASK,
+                keybindings.defaultModifierMask,
+                keybindings.ORCA_MODIFIER_MASK,
                 self.inputEventHandlers["toggleStructuralNavigationHandler"]))
 
         for structuralNavigationObject in list(self.enabledObjects.values()):
@@ -1806,10 +1806,10 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.ANCHOR_PREV
-        bindings["previous"] = ["a", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["a", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.ANCHOR_NEXT
-        bindings["next"] = ["a", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["a", keybindings.NO_MODIFIER_MASK, nextDesc]
         return bindings
 
     def _anchorCriteria(self, collection, arg=None):
@@ -1877,13 +1877,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.BLOCKQUOTE_PREV
-        bindings["previous"] = ["q", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["q", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.BLOCKQUOTE_NEXT
-        bindings["next"] = ["q", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["q", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.BLOCKQUOTE_LIST
-        bindings["list"] = ["q", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["q", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _blockquoteCriteria(self, collection, arg=None):
@@ -1963,13 +1963,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.BUTTON_PREV
-        bindings["previous"] = ["b", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["b", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.BUTTON_NEXT
-        bindings["next"] = ["b", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["b", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.BUTTON_LIST
-        bindings["list"] = ["b", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["b", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _buttonCriteria(self, collection, arg=None):
@@ -2045,13 +2045,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.CHECK_BOX_PREV
-        bindings["previous"] = ["x", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["x", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.CHECK_BOX_NEXT
-        bindings["next"] = ["x", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["x", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.CHECK_BOX_LIST
-        bindings["list"] = ["x", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["x", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _checkBoxCriteria(self, collection, arg=None):
@@ -2128,13 +2128,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.LARGE_OBJECT_PREV
-        bindings["previous"] = ["o", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["o", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.LARGE_OBJECT_NEXT
-        bindings["next"] = ["o", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["o", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.LARGE_OBJECT_LIST
-        bindings["list"] = ["o", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["o", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _chunkCriteria(self, collection, arg=None):
@@ -2219,13 +2219,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.COMBO_BOX_PREV
-        bindings["previous"] = ["c", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["c", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.COMBO_BOX_NEXT
-        bindings["next"] = ["c", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["c", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.COMBO_BOX_LIST
-        bindings["list"] = ["c", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["c", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _comboBoxCriteria(self, collection, arg=None):
@@ -2302,13 +2302,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.ENTRY_PREV
-        bindings["previous"] = ["e", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["e", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.ENTRY_NEXT
-        bindings["next"] = ["e", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["e", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.ENTRY_LIST
-        bindings["list"] = ["e", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["e", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _entryCriteria(self, collection, arg=None):
@@ -2398,14 +2398,14 @@ class StructuralNavigation:
         bindings = {}
         prevDesc = cmdnames.FORM_FIELD_PREV
         bindings["previous"] = ["Tab",
-                                settings.ORCA_SHIFT_MODIFIER_MASK,
+                                keybindings.ORCA_SHIFT_MODIFIER_MASK,
                                 prevDesc]
 
         nextDesc = cmdnames.FORM_FIELD_NEXT
-        bindings["next"] = ["Tab", settings.ORCA_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["Tab", keybindings.ORCA_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.FORM_FIELD_LIST
-        bindings["list"] = ["f", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["f", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _formFieldCriteria(self, collection, arg=None):
@@ -2490,13 +2490,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.HEADING_PREV
-        bindings["previous"] = ["h", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["h", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.HEADING_NEXT
-        bindings["next"] = ["h", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["h", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.HEADING_LIST
-        bindings["list"] = ["h", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["h", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
 
         prevAtLevelBindings = []
         nextAtLevelBindings = []
@@ -2505,17 +2505,17 @@ class StructuralNavigation:
         for i in range(minLevel, maxLevel + 1):
             prevDesc = cmdnames.HEADING_AT_LEVEL_PREV % i
             prevAtLevelBindings.append([str(i),
-                                        settings.SHIFT_MODIFIER_MASK,
+                                        keybindings.SHIFT_MODIFIER_MASK,
                                         prevDesc])
 
             nextDesc = cmdnames.HEADING_AT_LEVEL_NEXT % i
             nextAtLevelBindings.append([str(i),
-                                        settings.NO_MODIFIER_MASK,
+                                        keybindings.NO_MODIFIER_MASK,
                                         nextDesc])
 
             listDesc = cmdnames.HEADING_AT_LEVEL_LIST %i
             listAtLevelBindings.append([str(i),
-                                        settings.SHIFT_ALT_MODIFIER_MASK,
+                                        keybindings.SHIFT_ALT_MODIFIER_MASK,
                                         listDesc])
 
         bindings["previousAtLevel"] = prevAtLevelBindings
@@ -2622,13 +2622,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.LANDMARK_PREV
-        bindings["previous"] = ["m", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["m", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.LANDMARK_NEXT
-        bindings["next"] = ["m", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["m", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.LANDMARK_LIST
-        bindings["list"] = ["m", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["m", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _landmarkCriteria(self, collection, arg=None):
@@ -2719,13 +2719,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.LIST_PREV
-        bindings["previous"] = ["l", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["l", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.LIST_NEXT
-        bindings["next"] = ["l", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["l", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.LIST_LIST
-        bindings["list"] = ["l", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["l", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _listCriteria(self, collection, arg=None):
@@ -2819,13 +2819,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.LIST_ITEM_PREV
-        bindings["previous"] = ["i", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["i", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.LIST_ITEM_NEXT
-        bindings["next"] = ["i", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["i", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.LIST_ITEM_LIST
-        bindings["list"] = ["i", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["i", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _listItemCriteria(self, collection, arg=None):
@@ -2907,13 +2907,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.LIVE_REGION_PREV
-        bindings["previous"] = ["d", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["d", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.LIVE_REGION_NEXT
-        bindings["next"] = ["d", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["d", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         desc = cmdnames.LIVE_REGION_LAST
-        bindings["last"] = ["y", settings.NO_MODIFIER_MASK, desc]
+        bindings["last"] = ["y", keybindings.NO_MODIFIER_MASK, desc]
         return bindings
 
     def _liveRegionCriteria(self, collection, arg=None):
@@ -2987,13 +2987,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.PARAGRAPH_PREV
-        bindings["previous"] = ["p", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["p", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.PARAGRAPH_NEXT
-        bindings["next"] = ["p", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["p", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.PARAGRAPH_LIST
-        bindings["list"] = ["p", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["p", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _paragraphCriteria(self, collection, arg=None):
@@ -3073,13 +3073,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.RADIO_BUTTON_PREV
-        bindings["previous"] = ["r", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["r", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.RADIO_BUTTON_NEXT
-        bindings["next"] = ["r", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["r", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.RADIO_BUTTON_LIST
-        bindings["list"] = ["r", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["r", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _radioButtonCriteria(self, collection, arg=None):
@@ -3156,10 +3156,10 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.SEPARATOR_PREV
-        bindings["previous"] = ["s", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["s", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.SEPARATOR_NEXT
-        bindings["next"] = ["s", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["s", keybindings.NO_MODIFIER_MASK, nextDesc]
         return bindings
 
     def _separatorCriteria(self, collection, arg=None):
@@ -3218,13 +3218,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.TABLE_PREV
-        bindings["previous"] = ["t", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["t", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.TABLE_NEXT
-        bindings["next"] = ["t", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["t", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.TABLE_LIST
-        bindings["list"] = ["t", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["t", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _tableCriteria(self, collection, arg=None):
@@ -3305,22 +3305,22 @@ class StructuralNavigation:
 
         bindings = {}
         desc = cmdnames.TABLE_CELL_LEFT
-        bindings["left"] = ["Left", settings.SHIFT_ALT_MODIFIER_MASK, desc]
+        bindings["left"] = ["Left", keybindings.SHIFT_ALT_MODIFIER_MASK, desc]
 
         desc = cmdnames.TABLE_CELL_RIGHT
-        bindings["right"] = ["Right", settings.SHIFT_ALT_MODIFIER_MASK, desc]
+        bindings["right"] = ["Right", keybindings.SHIFT_ALT_MODIFIER_MASK, desc]
 
         desc = cmdnames.TABLE_CELL_UP
-        bindings["up"] = ["Up", settings.SHIFT_ALT_MODIFIER_MASK, desc]
+        bindings["up"] = ["Up", keybindings.SHIFT_ALT_MODIFIER_MASK, desc]
 
         desc = cmdnames.TABLE_CELL_DOWN
-        bindings["down"] = ["Down", settings.SHIFT_ALT_MODIFIER_MASK, desc]
+        bindings["down"] = ["Down", keybindings.SHIFT_ALT_MODIFIER_MASK, desc]
 
         desc = cmdnames.TABLE_CELL_FIRST
-        bindings["first"] = ["Home", settings.SHIFT_ALT_MODIFIER_MASK, desc]
+        bindings["first"] = ["Home", keybindings.SHIFT_ALT_MODIFIER_MASK, desc]
 
         desc = cmdnames.TABLE_CELL_LAST
-        bindings["last"] = ["End", settings.SHIFT_ALT_MODIFIER_MASK, desc]
+        bindings["last"] = ["End", keybindings.SHIFT_ALT_MODIFIER_MASK, desc]
         return bindings
 
     def _tableCellCriteria(self, collection, arg=None):
@@ -3399,13 +3399,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.UNVISITED_LINK_PREV
-        bindings["previous"] = ["u", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["u", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.UNVISITED_LINK_NEXT
-        bindings["next"] = ["u", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["u", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.UNVISITED_LINK_LIST
-        bindings["list"] = ["u", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["u", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
 
         return bindings
 
@@ -3492,13 +3492,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.VISITED_LINK_PREV
-        bindings["previous"] = ["v", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["v", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.VISITED_LINK_NEXT
-        bindings["next"] = ["v", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["v", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.VISITED_LINK_LIST
-        bindings["list"] = ["v", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["v", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
 
         return bindings
 
@@ -3577,13 +3577,13 @@ class StructuralNavigation:
 
         bindings = {}
         prevDesc = cmdnames.LINK_PREV
-        bindings["previous"] = ["k", settings.SHIFT_MODIFIER_MASK, prevDesc]
+        bindings["previous"] = ["k", keybindings.SHIFT_MODIFIER_MASK, prevDesc]
 
         nextDesc = cmdnames.LINK_NEXT
-        bindings["next"] = ["k", settings.NO_MODIFIER_MASK, nextDesc]
+        bindings["next"] = ["k", keybindings.NO_MODIFIER_MASK, nextDesc]
 
         listDesc = cmdnames.LINK_LIST
-        bindings["list"] = ["k", settings.SHIFT_ALT_MODIFIER_MASK, listDesc]
+        bindings["list"] = ["k", keybindings.SHIFT_ALT_MODIFIER_MASK, listDesc]
         return bindings
 
     def _linkCriteria(self, collection, arg=None):


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