Commit a3be0c09 authored by Joanmarie Diggs's avatar Joanmarie Diggs

Web: Don't clear command state when the last keyboard event is modifier

We were losing track that the last command was a caret-navigation
command when Ctrl was released after using Ctrl+Home. As a result,
when the browser emits caret-moved and focus-changed events we
triggered, we process them rather than ignoring them as caused by us.
parent b27cffd3
......@@ -869,6 +869,12 @@ class KeyboardEvent(InputEvent):
msg = 'CONSUMED: %s (%s)' % (self._did_consume, self._result_reason)
debug.println(debug.LEVEL_INFO, msg, True)
if debug.LEVEL_INFO >= debug.debugLevel and orca_state.activeScript:
attributes = orca_state.activeScript.getTransferableAttributes()
for key, value in attributes.items():
msg = 'INPUT EVENT: %s: %s' % (key, value)
debug.println(debug.LEVEL_INFO, msg, True)
msg = 'TOTAL PROCESSING TIME: %.4f' % (time.time() - startTime)
debug.println(debug.LEVEL_INFO, msg, True)
......
......@@ -563,9 +563,11 @@ class Script(default.Script):
self._lastCommandWasMouseButton = False
return consumes
self._lastCommandWasCaretNav = False
self._lastCommandWasStructNav = False
self._lastCommandWasMouseButton = False
if not keyboardEvent.isModifierKey():
self._lastCommandWasCaretNav = False
self._lastCommandWasStructNav = False
self._lastCommandWasMouseButton = False
return super().consumesKeyboardEvent(keyboardEvent)
def consumesBrailleEvent(self, brailleEvent):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment