browseMode module

browseMode.reportPassThrough(treeInterceptor, onlyIfChanged=True)

Reports the pass through mode if it has changed. @param treeInterceptor: The current Browse Mode treeInterceptor. @type treeInterceptor: L{BrowseModeTreeInterceptor} @param onlyIfChanged: if true reporting will not happen if the last reportPassThrough reported the same thing. @type onlyIfChanged: bool

browseMode.mergeQuickNavItemIterators(iterators, direction='next')

Merges multiple iterators that emit L{QuickNavItem} objects, yielding them from first to last. They are sorted using min or max (__lt__ should be implemented on the L{QuickNavItem} objects). @param iters: the iterators you want to merge. @type iters: sequence of iterators that emit L{QuicknavItem} objects. @param direction: the direction these iterators are searching (e.g. next, previous) @type direction: string

class browseMode.QuickNavItem(itemType, document)

Bases: object

Emitted by L{BrowseModeTreeInterceptor._iterNodesByType}, this represents one of many positions in a browse mode document, based on the type of item being searched for (e.g. link, heading, table etc).

@param itemType: the type that was searched for (e.g. link, heading, table etc) @type itemType: string @param document: the browse mode document this item is a part of. @type document: L{BrowseModeTreeInterceptor}

label = None

The label that should represent this item in the Elements list.

isAfterSelection = False

Is this item positioned after the caret in the document? Used by the elements list to place its own selection.

itemType = None

The type of items searched for (e.g. link, heading, table etc)

abstract isChild(parent)

Is this item a child of the given parent? This is used when representing items in a hierarchical tree structure, such as the Elements List. @param parent: the item of whom this item may be a child of. @type parent: L{QuickNavItem} @return: True if this item is a child, false otherwise. @rtype: bool

abstract report(readUnit=None)

Reports the contents of this item. @param readUnit: the optional unit (e.g. line, paragraph) that should be used to announce the item position when moved to. If not given, then the full sise of the item is used. @type readUnit: a L{textInfos}.UNIT_* constant.

abstract moveTo()

Moves the browse mode caret or focus to this item.

activate()

Activates this item’s position. E.g. follows a link, presses a button etc.

rename(newName)

Renames this item with the new name.

property isRenameAllowed
_abc_impl = <_abc._abc_data object>
class browseMode.TextInfoQuickNavItem(itemType: str, document: TreeInterceptor, textInfo: TextInfo, outputReason: OutputReason = OutputReason.QUICKNAV)

Bases: QuickNavItem

Represents a quick nav item in a browse mode document who’s positions are represented by a L{textInfos.TextInfo}.

See L{QuickNavItem.__init__} for itemType and document argument definitions. @param textInfo: the textInfo position this item represents. @type textInfo: L{textInfos.TextInfo}

property obj
property label
isChild(parent)

Is this item a child of the given parent? This is used when representing items in a hierarchical tree structure, such as the Elements List. @param parent: the item of whom this item may be a child of. @type parent: L{QuickNavItem} @return: True if this item is a child, false otherwise. @rtype: bool

report(readUnit=None)

Reports the contents of this item. @param readUnit: the optional unit (e.g. line, paragraph) that should be used to announce the item position when moved to. If not given, then the full sise of the item is used. @type readUnit: a L{textInfos}.UNIT_* constant.

activate()

Activates this item’s position. E.g. follows a link, presses a button etc.

moveTo()

Moves the browse mode caret or focus to this item.

property isAfterSelection

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

_getLabelForProperties(labelPropertyGetter: Callable[[str], Any | None])

Fetches required properties for this L{TextInfoQuickNavItem} and constructs a label to be shown in an elements list. This can be used by subclasses to implement the L{label} property. @Param labelPropertyGetter: A callable taking 1 argument, specifying the property to fetch.

For example, if L{itemType} is landmark, the callable must return the landmark type when “landmark” is passed as the property argument. Alternative property names might be name or value. The callable must return None if the property doesn’t exist. An expected callable might be get method on a L{Dict}, or “lambda property: getattr(self.obj, property, None)” for an L{NVDAObject}.

_abc_impl = <_abc._abc_data object>
class browseMode.BrowseModeTreeInterceptor(*args, **kwargs)

Bases: TreeInterceptor

scriptCategory = 'Browse mode'
_disableAutoPassThrough = False
APPLICATION_ROLES = (Role.APPLICATION, Role.DIALOG)
_get_currentNVDAObject()
_get_currentFocusableNVDAObject()
event_treeInterceptor_gainFocus()

Triggered when this browse mode interceptor gains focus. This event is only fired upon entering this treeInterceptor when it was not the current treeInterceptor before. This is different to L{event_gainFocus}, which is fired when an object inside this treeInterceptor gains focus, even if that object is in the same treeInterceptor.

ALWAYS_SWITCH_TO_PASS_THROUGH_ROLES = frozenset({Role.EDITABLETEXT, Role.MENUBAR, Role.POPUPMENU, Role.COMBOBOX, Role.LIST, Role.LISTITEM, Role.TREEVIEW, Role.TREEVIEWITEM, Role.TABCONTROL, Role.SLIDER, Role.TABLECELL, Role.TABLEROW, Role.TABLECOLUMNHEADER, Role.TABLEROWHEADER, Role.SPINBUTTON})
SWITCH_TO_PASS_THROUGH_ON_FOCUS_ROLES = frozenset({Role.RADIOBUTTON, Role.MENUITEM, Role.LISTITEM, Role.TAB, Role.CHECKMENUITEM, Role.RADIOMENUITEM})
IGNORE_DISABLE_PASS_THROUGH_WHEN_FOCUSED_ROLES = frozenset({Role.MENUITEM, Role.TABLECELL, Role.CHECKMENUITEM, Role.RADIOMENUITEM})
shouldPassThrough(obj, reason: OutputReason | None = None)

Determine whether pass through mode should be enabled (focus mode) or disabled (browse mode) for a given object. @param obj: The object in question. @type obj: L{NVDAObjects.NVDAObject} @param reason: The reason for this query; one of the output reasons, or C{None} for manual pass through mode activation by the user. @return: C{True} if pass through mode (focus mode) should be enabled, C{False} if it should be disabled (browse mode).

_get_shouldTrapNonCommandGestures()
script_trapNonCommandGesture(gesture)
singleLetterNavEnabled = True

Whether single letter navigation scripts should be active (true) or if these letters should fall to the application.

getAlternativeScript(gesture, script)
script_toggleSingleLetterNav(gesture)

Toggles single letter navigation on and off. When on, single letter keys in browse mode jump to various kinds of elements on the page. When off, these keys are passed to the application

_get_ElementsListDialog()
_iterNodesByType(itemType, direction='next', pos=None)

Yields L{QuickNavItem} objects representing the ordered positions in this document according to the type being searched for (e.g. link, heading, table etc). @param itemType: the type being searched for (e.g. link, heading, table etc) @type itemType: string @param direction: the direction in which to search (next, previous, up) @type direction: string @param pos: the position in the document from where to start the search. @type pos: Usually an L{textInfos.TextInfo} @raise NotImplementedError: This type is not supported by this BrowseMode implementation

_iterNotLinkBlock(direction='next', pos=None)
_iterTextStyle(kind: str, direction: _Movement = _Movement.NEXT, pos: TextInfo | None = None) Generator[TextInfoQuickNavItem, None, None]
_iterSimilarParagraph(kind: str, paragraphFunction: Callable[[TextInfo], Any | None], desiredValue: Any | None, direction: _Movement, pos: TextInfo) Generator[TextInfoQuickNavItem, None, None]
_quickNavScript(gesture, itemType, direction, errorMessage, readUnit)
classmethod addQuickNav(itemType: str, key: str | None, nextDoc: str, nextError: str, prevDoc: str, prevError: str, readUnit: str | None = None)

Adds a script for the given quick nav item. @param itemType: The type of item, I.E. “heading” “Link” … @param key: The quick navigation key to bind to the script.

Shift is automatically added for the previous item gesture. E.G. h for heading. If C{None} is provided, the script is unbound by default.

@param nextDoc: The command description to bind to the script that yields the next quick nav item. @param nextError: The error message if there are no more quick nav items of type itemType in this direction. @param prevDoc: The command description to bind to the script that yields the previous quick nav item. @param prevError: The error message if there are no more quick nav items of type itemType in this direction. @param readUnit: The unit (one of the textInfos.UNIT_* constants) to announce when moving to this type of item.

For example, only the line is read when moving to tables to avoid reading a potentially massive table. If None, the entire item will be announced.

script_elementsList(gesture)

Lists various types of elements in this document

_activateNVDAObject(obj)

Activate an object in response to a user request. This should generally perform the default action or click on the object. @param obj: The object to activate. @type obj: L{NVDAObjects.NVDAObject}

_activatePosition(obj=None)
script_activatePosition(gesture)

Activates the current object in the document

_focusLastFocusableObject(activatePosition=False)

Used when auto focus focusable elements is disabled to sync the focus to the browse mode cursor. When auto focus focusable elements is disabled, NVDA doesn’t focus elements as the user moves the browse mode cursor. However, there are some cases where the user always wants to interact with the focus; e.g. if they press the applications key to open the context menu. In these cases, this method is called first to sync the focus to the browse mode cursor.

script_passThrough(gesture)
script_disablePassThrough(gesture)
_set_disableAutoPassThrough(state)
_get_disableAutoPassThrough()
__gestures = {'kb:1': 'nextHeading1', 'kb:2': 'nextHeading2', 'kb:3': 'nextHeading3', 'kb:4': 'nextHeading4', 'kb:5': 'nextHeading5', 'kb:6': 'nextHeading6', 'kb:NVDA+f7': 'elementsList', 'kb:NVDA+shift+space': 'toggleSingleLetterNav', 'kb:a': 'nextAnnotation', 'kb:alt+enter': 'passThrough', 'kb:alt+numpadEnter': 'passThrough', 'kb:applications': 'passThrough', 'kb:b': 'nextButton', 'kb:c': 'nextComboBox', 'kb:control+enter': 'passThrough', 'kb:control+numpadEnter': 'passThrough', 'kb:control+shift+enter': 'passThrough', 'kb:control+shift+numpadEnter': 'passThrough', 'kb:d': 'nextLandmark', 'kb:e': 'nextEdit', 'kb:enter': 'activatePosition', 'kb:escape': 'disablePassThrough', 'kb:f': 'nextFormField', 'kb:g': 'nextGraphic', 'kb:h': 'nextHeading', 'kb:i': 'nextListItem', 'kb:k': 'nextLink', 'kb:l': 'nextList', 'kb:m': 'nextFrame', 'kb:n': 'nextNotLinkBlock', 'kb:numpadEnter': 'activatePosition', 'kb:o': 'nextEmbeddedObject', 'kb:p': 'nextTextParagraph', 'kb:q': 'nextBlockQuote', 'kb:r': 'nextRadioButton', 'kb:s': 'nextSeparator', 'kb:shift+1': 'previousHeading1', 'kb:shift+2': 'previousHeading2', 'kb:shift+3': 'previousHeading3', 'kb:shift+4': 'previousHeading4', 'kb:shift+5': 'previousHeading5', 'kb:shift+6': 'previousHeading6', 'kb:shift+a': 'previousAnnotation', 'kb:shift+applications': 'passThrough', 'kb:shift+b': 'previousButton', 'kb:shift+c': 'previousComboBox', 'kb:shift+d': 'previousLandmark', 'kb:shift+e': 'previousEdit', 'kb:shift+enter': 'passThrough', 'kb:shift+f': 'previousFormField', 'kb:shift+f10': 'passThrough', 'kb:shift+g': 'previousGraphic', 'kb:shift+h': 'previousHeading', 'kb:shift+i': 'previousListItem', 'kb:shift+k': 'previousLink', 'kb:shift+l': 'previousList', 'kb:shift+m': 'previousFrame', 'kb:shift+n': 'previousNotLinkBlock', 'kb:shift+numpadEnter': 'passThrough', 'kb:shift+o': 'previousEmbeddedObject', 'kb:shift+p': 'previousTextParagraph', 'kb:shift+q': 'previousBlockQuote', 'kb:shift+r': 'previousRadioButton', 'kb:shift+s': 'previousSeparator', 'kb:shift+t': 'previousTable', 'kb:shift+u': 'previousUnvisitedLink', 'kb:shift+v': 'previousVisitedLink', 'kb:shift+w': 'previousError', 'kb:shift+x': 'previousCheckBox', 'kb:space': 'activatePosition', 'kb:t': 'nextTable', 'kb:u': 'nextUnvisitedLink', 'kb:v': 'nextVisitedLink', 'kb:w': 'nextError', 'kb:x': 'nextCheckBox'}
ElementsListDialog
_abc_impl = <_abc._abc_data object>
currentFocusableNVDAObject
currentNVDAObject
property disableAutoPassThrough
script_nextAnnotation(gesture)

moves to the next annotation

script_nextArticle(gesture)

moves to the next article

script_nextBlockQuote(gesture)

moves to the next block quote

script_nextButton(gesture)

moves to the next button

script_nextCheckBox(gesture)

moves to the next check box

script_nextComboBox(gesture)

moves to the next combo box

script_nextDifferentStyle(gesture)

moves to the next different style text

script_nextEdit(gesture)

moves to the next edit field

script_nextEmbeddedObject(gesture)

moves to the next embedded object

script_nextError(gesture)

moves to the next error

script_nextFigure(gesture)

moves to the next figure

script_nextFormField(gesture)

moves to the next form field

script_nextFrame(gesture)

moves to the next frame

script_nextGraphic(gesture)

moves to the next graphic

script_nextGrouping(gesture)

moves to the next grouping

script_nextHeading(gesture)

moves to the next heading

script_nextHeading1(gesture)

moves to the next heading at level 1

script_nextHeading2(gesture)

moves to the next heading at level 2

script_nextHeading3(gesture)

moves to the next heading at level 3

script_nextHeading4(gesture)

moves to the next heading at level 4

script_nextHeading5(gesture)

moves to the next heading at level 5

script_nextHeading6(gesture)

moves to the next heading at level 6

script_nextLandmark(gesture)

moves to the next landmark

moves to the next link

script_nextList(gesture)

moves to the next list

script_nextListItem(gesture)

moves to the next list item

script_nextMath(gesture)

moves to the next math formula

script_nextMenuItem(gesture)

moves to the next menu item

script_nextNotLinkBlock(gesture)

skips forward past a block of links

script_nextProgressBar(gesture)

moves to the next progress bar

script_nextRadioButton(gesture)

moves to the next radio button

script_nextSameStyle(gesture)

moves to the next same style text

script_nextSeparator(gesture)

moves to the next separator

script_nextTab(gesture)

moves to the next tab

script_nextTable(gesture)

moves to the next table

script_nextTextParagraph(gesture)

moves to the next text paragraph

script_nextToggleButton(gesture)

moves to the next toggle button

moves to the next unvisited link

script_nextVerticalParagraph(gesture)

moves to the next vertically aligned paragraph

moves to the next visited link

script_previousAnnotation(gesture)

moves to the previous annotation

script_previousArticle(gesture)

moves to the previous article

script_previousBlockQuote(gesture)

moves to the previous block quote

script_previousButton(gesture)

moves to the previous button

script_previousCheckBox(gesture)

moves to the previous check box

script_previousComboBox(gesture)

moves to the previous combo box

script_previousDifferentStyle(gesture)

moves to the previous different style text

script_previousEdit(gesture)

moves to the previous edit field

script_previousEmbeddedObject(gesture)

moves to the previous embedded object

script_previousError(gesture)

moves to the previous error

script_previousFigure(gesture)

moves to the previous figure

script_previousFormField(gesture)

moves to the previous form field

script_previousFrame(gesture)

moves to the previous frame

script_previousGraphic(gesture)

moves to the previous graphic

script_previousGrouping(gesture)

moves to the previous grouping

script_previousHeading(gesture)

moves to the previous heading

script_previousHeading1(gesture)

moves to the previous heading at level 1

script_previousHeading2(gesture)

moves to the previous heading at level 2

script_previousHeading3(gesture)

moves to the previous heading at level 3

script_previousHeading4(gesture)

moves to the previous heading at level 4

script_previousHeading5(gesture)

moves to the previous heading at level 5

script_previousHeading6(gesture)

moves to the previous heading at level 6

script_previousLandmark(gesture)

moves to the previous landmark

moves to the previous link

script_previousList(gesture)

moves to the previous list

script_previousListItem(gesture)

moves to the previous list item

script_previousMath(gesture)

moves to the previous math formula

script_previousMenuItem(gesture)

moves to the previous menu item

script_previousNotLinkBlock(gesture)

skips backward past a block of links

script_previousProgressBar(gesture)

moves to the previous progress bar

script_previousRadioButton(gesture)

moves to the previous radio button

script_previousSameStyle(gesture)

moves to the previous same style text

script_previousSeparator(gesture)

moves to the previous separator

script_previousTab(gesture)

moves to the previous tab

script_previousTable(gesture)

moves to the previous table

script_previousTextParagraph(gesture)

moves to the previous text paragraph

script_previousToggleButton(gesture)

moves to the previous toggle button

moves to the previous unvisited link

script_previousVerticalParagraph(gesture)

moves to the previous vertically aligned paragraph

moves to the previous visited link

shouldTrapNonCommandGestures

If true then gestures that do not have a script and are not a command gesture should be trapped from going through to Windows.

class browseMode.ElementsListDialog(document)

Bases: DpiScalingHelperMixinWithoutInit, ContextHelpMixin, Dialog

helpId = 'ElementsList'
ELEMENT_TYPES = (('link', 'Lin&ks'), ('heading', '&Headings'), ('formField', '&Form fields'), ('button', '&Buttons'), ('landmark', 'Lan&dmarks'))
class Element(item, parent)

Bases: tuple

Create new instance of Element(item, parent)

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('item', 'parent')
classmethod _make(iterable)

Make a new Element object from a sequence or iterable

_replace(**kwds)

Return a new Element object replacing specified fields with new values

item

Alias for field number 0

parent

Alias for field number 1

lastSelectedElementType = 0
onElementTypeChange(evt)
initElementType(elType)
filter(filterText, newElementType=False)
onTreeSetFocus(evt)
onTreeChar(evt)
onTreeLabelEditBegin(evt)
onTreeLabelEditEnd(evt)
_clearSearchText()
search(searchText)
_iterReachableTreeItemsFromItem(item)
FILTER_TIMER_DELAY_MS = 300
onFilterEditTextChange(evt: CommandEvent) None
onAction(activate)
class browseMode.BrowseModeDocumentTextInfo(*args, **kwargs)

Bases: TextInfo

Constructor. Subclasses must extend this, calling the superclass method first. @param position: The initial position of this range; one of the POSITION_* constants or a position object supported by the implementation. @param obj: The object containing the range of text being represented.

_get_focusableNVDAObjectAtStart()

retreaves the deepest focusable NVDAObject related to the start of the range. Usually it is just the owner NVDAObject, but in the case of virtualBuffers it may be a descendant object. @returns: the NVDAObject at the start

_abc_impl = <_abc._abc_data object>
focusableNVDAObjectAtStart
class browseMode.BrowseModeDocumentTreeInterceptor(*args, **kwargs)

Bases: DocumentWithTableNavigation, CursorManager, BrowseModeTreeInterceptor, DocumentTreeInterceptor

programmaticScrollMayFireEvent = False
_lastCaretMoveWasFocus

True if the last caret move was due to a focus change.

terminate()

Terminate this interceptor. This is called to perform any clean up when this interceptor is being destroyed.

_get_currentNVDAObject()
event_treeInterceptor_gainFocus()

Triggered when this browse mode interceptor gains focus. This event is only fired upon entering this treeInterceptor when it was not the current treeInterceptor before. This is different to L{event_gainFocus}, which is fired when an object inside this treeInterceptor gains focus, even if that object is in the same treeInterceptor.

event_caret(obj, nextHandler)
_activateLongDesc(controlField)

Activates (presents) the long description for a particular field (usually a graphic). @param controlField: the field who’s long description should be activated. This field is guaranteed to have states containing HASLONGDESC state. @type controlField: dict

_activatePosition(obj=None, info=None)
_set_selection(info, reason=OutputReason.CARET)
_shouldSetFocusToObj(obj)

Determine whether an object should receive focus. Subclasses may extend or override this method. @param obj: The object in question. @type obj: L{NVDAObjects.NVDAObject}

script_activateLongDesc(gesture)

Shows the long description at this position if one is found.

event_caretMovementFailed(obj, nextHandler, gesture=None)
currentExpandedControl = None

an NVDAObject representing the control that has just been expanded with the collapseOrExpandControl script.

script_collapseOrExpandControl(gesture: InputGesture)
_collapseOrExpandControl_scriptHelper(gesture: InputGesture)
_tabOverride(direction)

Override the tab order if the virtual caret is not within the currently focused node. This is done because many nodes are not focusable and it is thus possible for the virtual caret to be unsynchronised with the focus. In this case, we want tab/shift+tab to move to the next/previous focusable node relative to the virtual caret. If the virtual caret is within the focused node, the tab/shift+tab key should be passed through to allow normal tab order navigation. Note that this method does not pass the key through itself if it is not overridden. This should be done by the calling script if C{False} is returned. @param direction: The direction in which to move. @type direction: str @return: C{True} if the tab order was overridden, C{False} if not. @rtype: bool

script_tab(gesture)
script_shiftTab(gesture)
event_focusEntered(obj, nextHandler)
_shouldIgnoreFocus(obj)

Determines whether focus on a given object should be ignored. @param obj: The object in question. @type obj: L{NVDAObjects.NVDAObject} @return: C{True} if focus on L{obj} should be ignored, C{False} otherwise. @rtype: bool

_postGainFocus(obj)

Executed after a gainFocus within the browseMode document. This will not be executed if L{event_gainFocus} determined that it should abort and call nextHandler. @param obj: The object that gained focus. @type obj: L{NVDAObjects.NVDAObject}

_replayFocusEnteredEvents()
event_gainFocus(obj, nextHandler)
_handleScrollTo(obj: NVDAObject | TextInfo) bool

Handle scrolling the browseMode document to a given object in response to an event. Subclasses should call this from an event which indicates that the document has scrolled. @postcondition: The virtual caret is moved to L{obj} and the buffer content for L{obj} is reported. @param obj: The object to which the document should scroll. @return: C{True} if the document was scrolled, C{False} if not. @note: If C{False} is returned, calling events should probably call their nextHandler.

_isNVDAObjectInApplication_noWalk(obj)

Determine whether a given object is within an application without walking ancestors. The base implementation simply checks whether the object has an application role. Subclasses can override this if they can provide a definite answer without needing to walk. For example, for virtual buffers, if the object is in the buffer, it definitely isn’t in an application. L{_isNVDAObjectInApplication} calls this and walks to the next ancestor if C{None} is returned. @return: C{True} if definitely in an application,

C{False} if definitely not in an application, C{None} if this can’t be determined without walking ancestors.

_isNVDAObjectInApplication(obj)

Determine whether a given object is within an application. The object is considered to be within an application if it or one of its ancestors has an application role. This should only be called on objects beneath the treeInterceptor’s root NVDAObject. @param obj: The object in question. @type obj: L{NVDAObjects.NVDAObject} @return: C{True} if L{obj} is within an application, C{False} otherwise. @rtype: bool

documentConstantIdentifier: str | None

Typing information for auto-property: _get_documentConstantIdentifier

_cache_documentConstantIdentifier = True
_get_documentConstantIdentifier() str | None

Get the constant identifier for this document. This identifier should uniquely identify all instances (not just one instance) of a document for at least the current session of the hosting application. Generally, the document URL should be used. Although the name of this property suggests that the identifier will be constant, With the introduction of SPAs (single page apps) the URL of a page may dynamically change over time. this property should reflect the most up to date URL. @return: The constant identifier for this document, C{None} if there is none.

_get_shouldRememberCaretPositionAcrossLoads()

Specifies whether the position of the caret should be remembered when this document is loaded again. This is useful when the browser remembers the scroll position for the document, but does not communicate this information via APIs. The remembered caret position is associated with this document using L{documentConstantIdentifier}. @return: C{True} if the caret position should be remembered, C{False} if not. @rtype: bool

_getInitialCaretPos()

Retrieve the initial position of the caret after the buffer has been loaded. This position, if any, will be passed to L{makeTextInfo}. Subclasses should extend this method. @return: The initial position of the caret, C{None} if there isn’t one. @rtype: TextInfo position

getEnclosingContainerRange(textRange)
script_moveToStartOfContainer(gesture)

Moves to the start of the container element, such as a list or table

script_movePastEndOfContainer(gesture)

Moves past the end of the container element, such as a list or table

_isSuitableNotLinkBlock(textRange)
_iterNotLinkBlock(direction='next', pos=None)
STYLE_ATTRIBUTES = frozenset({'background-color', 'bold', 'color', 'font-family', 'font-size', 'italic', 'marked', 'strikethrough', 'text-line-through-style', 'text-underline-style', 'underline'})
_extractStyles(info: TextInfo) List[str | FieldCommand]

This function calls TextInfo.getTextWithFields(), and then processes fields in the following way: 1. Highlighted (marked) text is currently reported as Role.MARKED_CONTENT, and not formatChange. For ease of further handling we create a new boolean format field “marked” and set its value according to presence of Role.MARKED_CONTENT. 2. Then we drop all control fields, leaving only formatChange fields and text. @raise RuntimeError: found unknown command in getTextWithFields()

_mergeIdenticalStyles(sequence: List[str | FieldCommand]) List[str | FieldCommand]

This function is used to postprocess styles output of _extractStyles function. Raw output of _extractStyles function might contain identical styles, since textInfos might contain formatChange fields for other reasons rather than style change. This function removes redundant formatChange fields and merges str items as appropriate.

_expandStyle(textRange: TextInfo, style: dict, direction: _Movement)

Given textRange in given style, this function expands textRange in the desired direction as long as all text still belongs to the same style. This function can expand textInfos across paragraphs.

_moveToNextParagraph(paragraph: TextInfo, direction: _Movement) bool
_iterTextStyle(kind: str, direction: _Movement = _Movement.NEXT, pos: TextInfo | None = None) Generator[TextInfoQuickNavItem, None, None]
__gestures = {'kb:,': 'movePastEndOfContainer', 'kb:NVDA+shift+f10': 'toggleNativeAppSelectionMode', 'kb:NVDA+v': 'toggleScreenLayout', 'kb:alt+downArrow': 'collapseOrExpandControl', 'kb:alt+upArrow': 'collapseOrExpandControl', 'kb:shift+,': 'moveToStartOfContainer', 'kb:shift+tab': 'shiftTab', 'kb:tab': 'tab'}
script_toggleScreenLayout(gesture)

Toggles on and off if the screen layout is preserved while rendering the document content

updateAppSelection()

Update the native selection in the application to match the browse mode selection in NVDA.

clearAppSelection()

Clear the native selection in the application.

_abc_impl = <_abc._abc_data object>
currentNVDAObject
script_toggleNativeAppSelectionMode(gesture: InputGesture)

Toggles native selection mode on and off

property selection
shouldRememberCaretPositionAcrossLoads
MAX_ITERATIONS_FOR_SIMILAR_PARAGRAPH = 100000
_iterSimilarParagraph(kind: str, paragraphFunction: Callable[[TextInfo], Any | None], desiredValue: Any | None, direction: _Movement, pos: TextInfo) Generator[TextInfoQuickNavItem, None, None]