Skip to content

Commit 3496fe6

Browse files
authored
Merge pull request #14 from NSoiffer/Fix-tab-order-issue
Update MathCATPreferences.py
2 parents 49b7348 + a3476fa commit 3496fe6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

NVDA-addon/addon/globalPlugins/MathCAT/MathCATPreferences.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,24 @@ def MathCATPreferencesDialogOnCharHook(self,event):
233233
self.m_listBoxPreferencesTopic.SetFocus()
234234
#jump out so the tab key is not processed
235235
return
236+
if (event.GetModifiers() == wx.MOD_NONE) and (MathCATgui.MathCATPreferencesDialog.FindFocus() == self.m_listBoxPreferencesTopic):
237+
#user tabbed from into the paged content, set the focus on the first control
238+
if self.m_listBoxPreferencesTopic.GetSelection() == 0:
239+
self.m_choiceImpairment.SetFocus()
240+
elif self.m_listBoxPreferencesTopic.GetSelection() == 1:
241+
self.m_choiceNavigationMode.SetFocus()
242+
elif self.m_listBoxPreferencesTopic.GetSelection() == 2:
243+
self.m_choiceBrailleMathCode.SetFocus()
244+
return
245+
if (event.GetModifiers() == wx.MOD_SHIFT) and (MathCATgui.MathCATPreferencesDialog.FindFocus() == self.m_buttonOK):
246+
#user shift+tabbed from into the paged content, set the focus on the last control
247+
if self.m_listBoxPreferencesTopic.GetSelection() == 0:
248+
self.m_choiceSpeechForChemical.SetFocus()
249+
elif self.m_listBoxPreferencesTopic.GetSelection() == 1:
250+
self.m_choiceSpeechAmountNavigation.SetFocus()
251+
elif self.m_listBoxPreferencesTopic.GetSelection() == 2:
252+
self.m_choiceBrailleHighlights.SetFocus()
253+
return
236254
#continue handling keyboard event
237255
event.Skip()
238256

0 commit comments

Comments
 (0)