Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 43 additions & 42 deletions source/appModules/lockapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,54 +34,55 @@ def event_NVDAObject_init(self, obj):
obj.parent = None

SAFE_SCRIPTS = {
GlobalCommands.script_reportCurrentFocus.__func__,
GlobalCommands.script_title.__func__,
GlobalCommands.script_dateTime.__func__,
GlobalCommands.script_say_battery_status.__func__,
GlobalCommands.script_navigatorObject_current.__func__,
GlobalCommands.script_navigatorObject_currentDimensions.__func__,
GlobalCommands.script_navigatorObject_toFocus.__func__,
GlobalCommands.script_navigatorObject_moveFocus.__func__,
GlobalCommands.script_navigatorObject_parent.__func__,
GlobalCommands.script_navigatorObject_next.__func__,
GlobalCommands.script_navigatorObject_previous.__func__,
GlobalCommands.script_navigatorObject_firstChild.__func__,
GlobalCommands.script_review_activate.__func__,
GlobalCommands.script_review_top.__func__,
GlobalCommands.script_review_previousLine.__func__,
GlobalCommands.script_review_currentLine.__func__,
GlobalCommands.script_review_nextLine.__func__,
GlobalCommands.script_review_bottom.__func__,
GlobalCommands.script_review_previousWord.__func__,
GlobalCommands.script_review_currentWord.__func__,
GlobalCommands.script_review_nextWord.__func__,
GlobalCommands.script_review_startOfLine.__func__,
GlobalCommands.script_review_previousCharacter.__func__,
GlobalCommands.script_review_currentCharacter.__func__,
GlobalCommands.script_review_nextCharacter.__func__,
GlobalCommands.script_review_endOfLine.__func__,
GlobalCommands.script_review_sayAll.__func__,
GlobalCommands.script_braille_scrollBack.__func__,
GlobalCommands.script_braille_scrollForward.__func__,
GlobalCommands.script_braille_routeTo.__func__,
GlobalCommands.script_braille_previousLine.__func__,
GlobalCommands.script_braille_nextLine.__func__,
GlobalCommands.script_navigatorObject_nextInFlow.__func__,
GlobalCommands.script_navigatorObject_previousInFlow.__func__,
GlobalCommands.script_touch_changeMode.__func__,
GlobalCommands.script_touch_newExplore.__func__,
GlobalCommands.script_touch_explore.__func__,
GlobalCommands.script_touch_hoverUp.__func__,
GlobalCommands.script_moveMouseToNavigatorObject.__func__,
GlobalCommands.script_moveNavigatorObjectToMouse.__func__,
GlobalCommands.script_leftMouseClick.__func__,
GlobalCommands.script_rightMouseClick.__func__,
GlobalCommands.script_reportCurrentFocus,
GlobalCommands.script_title,
GlobalCommands.script_dateTime,
GlobalCommands.script_say_battery_status,
GlobalCommands.script_navigatorObject_current,
GlobalCommands.script_navigatorObject_currentDimensions,
GlobalCommands.script_navigatorObject_toFocus,
GlobalCommands.script_navigatorObject_moveFocus,
GlobalCommands.script_navigatorObject_parent,
GlobalCommands.script_navigatorObject_next,
GlobalCommands.script_navigatorObject_previous,
GlobalCommands.script_navigatorObject_firstChild,
GlobalCommands.script_review_activate,
GlobalCommands.script_review_top,
GlobalCommands.script_review_previousLine,
GlobalCommands.script_review_currentLine,
GlobalCommands.script_review_nextLine,
GlobalCommands.script_review_bottom,
GlobalCommands.script_review_previousWord,
GlobalCommands.script_review_currentWord,
GlobalCommands.script_review_nextWord,
GlobalCommands.script_review_startOfLine,
GlobalCommands.script_review_previousCharacter,
GlobalCommands.script_review_currentCharacter,
GlobalCommands.script_review_nextCharacter,
GlobalCommands.script_review_endOfLine,
GlobalCommands.script_review_sayAll,
GlobalCommands.script_braille_scrollBack,
GlobalCommands.script_braille_scrollForward,
GlobalCommands.script_braille_routeTo,
GlobalCommands.script_braille_previousLine,
GlobalCommands.script_braille_nextLine,
GlobalCommands.script_navigatorObject_nextInFlow,
GlobalCommands.script_navigatorObject_previousInFlow,
GlobalCommands.script_touch_changeMode,
GlobalCommands.script_touch_newExplore,
GlobalCommands.script_touch_explore,
GlobalCommands.script_touch_hoverUp,
GlobalCommands.script_moveMouseToNavigatorObject,
GlobalCommands.script_moveNavigatorObjectToMouse,
GlobalCommands.script_leftMouseClick,
GlobalCommands.script_rightMouseClick,
}
def _inputCaptor(self, gesture):
script = gesture.script
if not script:
return True
# Only allow specific scripts so people can't touch the clipboard, change NVDA config, etc.
# #9883: script is a bound method, __func__ gives us the underlying function.
return script.__func__ in self.SAFE_SCRIPTS

def event_appModule_gainFocus(self):
Expand Down