Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b6fd89a
Added Web navigation to core
kefaslungu Jan 3, 2026
b4e9bd4
Pre-commit auto-fix
pre-commit-ci[bot] Jan 3, 2026
62eb77f
Added relevant user documentation and changes
kefaslungu Jan 3, 2026
daf47b4
Added name
kefaslungu Jan 3, 2026
8fe2f73
Merge branch 'webmode' of https://github.com/kefaslungu/nvda into web…
kefaslungu Jan 3, 2026
82043fa
Move web touch navigation into BrowseModeTreeInterceptor with dynamic…
kefaslungu Feb 19, 2026
6030aba
Merge branch 'master' into webmode
kefaslungu Feb 19, 2026
de05928
Pre-commit auto-fix
pre-commit-ci[bot] Feb 19, 2026
266c625
Addressed reviewer's comments
kefaslungu Feb 23, 2026
6a93eed
Merge branch 'webmode' of https://github.com/kefaslungu/nvda into web…
kefaslungu Feb 23, 2026
a68cdf3
Pre-commit auto-fix
pre-commit-ci[bot] Feb 23, 2026
d670765
Added documentation and minor fixes
kefaslungu Feb 27, 2026
3707430
Merge branch 'webmode' of https://github.com/kefaslungu/nvda into web…
kefaslungu Feb 27, 2026
4052b06
Fix type hint where necessary
kefaslungu Feb 27, 2026
152190a
Changed from webmode to browsemode
kefaslungu Mar 2, 2026
1fffa9e
Made edits to user docs and changes.md
kefaslungu Mar 2, 2026
c5ce667
rename web→browse, type hints, deprecation
kefaslungu Mar 2, 2026
5703f06
sentence split onto two lines in user docs and remove unnecessary imp…
kefaslungu Mar 4, 2026
7649ef3
Added documentation explaining browse mode in touch is only active wh…
kefaslungu Mar 5, 2026
3028100
updated docs and changes
kefaslungu Mar 9, 2026
53830c4
- Type annotate _enabledBrowseElements; Sphinx docstring
kefaslungu Mar 9, 2026
8af69b1
Merge upstream/master into webmode
kefaslungu Mar 9, 2026
8a9b3f2
changing the enum values to shorter strings, making _curTouchMode sto…
kefaslungu Mar 10, 2026
1c2a459
Fixed reviewers comments
kefaslungu Mar 10, 2026
3745f52
renamed AVAILABLE_TOUCH_MODES to availableTouchModes
kefaslungu Mar 11, 2026
f11f808
docs: Explicitly states the element type is remembered per document
kefaslungu Mar 24, 2026
f612318
translator comment now says browse mode touch navigation element types
kefaslungu Mar 24, 2026
6a7ba8e
clarifying comment added above the setting
kefaslungu Mar 24, 2026
9e237ef
addQuickNav docstring converted fully to Sphinx style
kefaslungu Mar 24, 2026
74614a2
Apply suggestions from code review
SaschaCowley Mar 30, 2026
ac048ae
Fixed reviewers suggestions
kefaslungu Mar 31, 2026
5690479
Merge branch 'webmode' of https://github.com/kefaslungu/nvda into web…
kefaslungu Mar 31, 2026
f0067e6
Update user_docs/en/userGuide.md
SaschaCowley Mar 31, 2026
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
8 changes: 4 additions & 4 deletions source/browseMode.py
Comment thread
kefaslungu marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ def _enabledBrowseElements(self) -> list[tuple[str | None, str]]:
"Selects the next element type for browse mode touch navigation",
),
category=inputCore.SCRCAT_BROWSEMODE,
gesture="ts(browseMode):flickDown",
gesture="ts(browse):flickDown",
)
def script_nextBrowseElement(self, gesture: inputCore.InputGesture) -> None:
enabled = self._enabledBrowseElements()
Expand All @@ -835,7 +835,7 @@ def script_nextBrowseElement(self, gesture: inputCore.InputGesture) -> None:
"Selects the previous element type for browse mode touch navigation",
),
category=inputCore.SCRCAT_BROWSEMODE,
gesture="ts(browseMode):flickUp",
gesture="ts(browse):flickUp",
)
def script_prevBrowseElement(self, gesture: inputCore.InputGesture) -> None:
enabled = self._enabledBrowseElements()
Expand All @@ -854,7 +854,7 @@ def script_prevBrowseElement(self, gesture: inputCore.InputGesture) -> None:
"Moves to the next element of the selected type in browse mode touch navigation",
),
category=inputCore.SCRCAT_BROWSEMODE,
gesture="ts(browseMode):flickRight",
gesture="ts(browse):flickRight",
)
def script_nextSelectedElement(self, gesture: inputCore.InputGesture) -> None:
itemType = self._browseModeCurrentType
Expand All @@ -871,7 +871,7 @@ def script_nextSelectedElement(self, gesture: inputCore.InputGesture) -> None:
"Moves to the previous element of the selected type in browse mode touch navigation",
),
category=inputCore.SCRCAT_BROWSEMODE,
gesture="ts(browseMode):flickLeft",
gesture="ts(browse):flickLeft",
)
def script_prevSelectedElement(self, gesture: inputCore.InputGesture) -> None:
itemType = self._browseModeCurrentType
Expand Down
8 changes: 4 additions & 4 deletions source/globalCommands.py
Comment thread
kefaslungu marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -4578,10 +4578,10 @@ def script_toggleTouchSupport(self, gesture):
)
def script_touch_changeMode(self, gesture):
mode = touchHandler.handler._curTouchMode
index = touchHandler.availableTouchModes.index(mode)
index = (index + 1) % len(touchHandler.availableTouchModes)
newMode = touchHandler.availableTouchModes[index]
touchHandler.handler._curTouchMode = newMode.value
index = touchHandler.AVAILABLE_TOUCH_MODES.index(mode)
index = (index + 1) % len(touchHandler.AVAILABLE_TOUCH_MODES)
newMode = touchHandler.AVAILABLE_TOUCH_MODES[index]
touchHandler.handler._curTouchMode = newMode
ui.message(newMode.displayString)

@script(
Expand Down
27 changes: 15 additions & 12 deletions source/touchHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
{
"text": _("text mode"),
"object": _("object mode"),
"browseMode": _("browse mode"),
"browse": _("browse mode"),
},
message="Use touchHandler.TouchMode enum instead.",
),
Expand All @@ -79,7 +79,10 @@ class TouchMode(DisplayStringStrEnum):

TEXT = "text"
OBJECT = "object"
BROWSE = "browseMode"
BROWSE = "browse"

def __str__(self) -> str:
return self.value
Comment thread
kefaslungu marked this conversation as resolved.
Outdated
Comment thread
kefaslungu marked this conversation as resolved.
Outdated

@cached_property
def _displayStringLabels(self) -> dict[Self, str]:
Expand All @@ -93,7 +96,7 @@ def _displayStringLabels(self) -> dict[Self, str]:
}


availableTouchModes: list[TouchMode] = [TouchMode.TEXT, TouchMode.OBJECT]
AVAILABLE_TOUCH_MODES: list[TouchMode] = [TouchMode.TEXT, TouchMode.OBJECT]

HWND_MESSAGE = -3

Expand Down Expand Up @@ -139,18 +142,18 @@ def _browseModeStateChange(

if browseMode:
# Entering browse mode
if TouchMode.BROWSE not in availableTouchModes:
availableTouchModes.append(TouchMode.BROWSE)
if TouchMode.BROWSE not in AVAILABLE_TOUCH_MODES:
AVAILABLE_TOUCH_MODES.append(TouchMode.BROWSE)

handler._curTouchMode = TouchMode.BROWSE.value
handler._curTouchMode = TouchMode.BROWSE

Comment thread
seanbudd marked this conversation as resolved.
else:
# Leaving browse mode
if TouchMode.BROWSE in availableTouchModes:
availableTouchModes.remove(TouchMode.BROWSE)
if TouchMode.BROWSE in AVAILABLE_TOUCH_MODES:
AVAILABLE_TOUCH_MODES.remove(TouchMode.BROWSE)

if handler._curTouchMode == TouchMode.BROWSE.value:
handler._curTouchMode = TouchMode.OBJECT.value
if handler._curTouchMode == TouchMode.BROWSE:
handler._curTouchMode = TouchMode.OBJECT


class POINTER_INFO(Structure):
Expand Down Expand Up @@ -307,7 +310,7 @@ class TouchHandler(threading.Thread):
def __init__(self):
self.pendingEmitsTimer = gui.NonReEntrantTimer(core.requestPump)
super().__init__(name=f"{self.__class__.__module__}.{self.__class__.__qualname__}")
self._curTouchMode = "object"
self._curTouchMode = TouchMode.OBJECT
self.initializedEvent = threading.Event()
self.threadExc = None
self.start()
Expand Down Expand Up @@ -385,7 +388,7 @@ def inputTouchWndProc(self, hwnd, msg, wParam, lParam):
return user32.DefWindowProc(hwnd, msg, wParam, lParam)

def setMode(self, mode):
if mode not in availableTouchModes:
if mode not in AVAILABLE_TOUCH_MODES:
raise ValueError("Unknown mode %s" % mode)
self._curTouchMode = mode

Expand Down
2 changes: 0 additions & 2 deletions tests/checkPot.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
"column break",
"background pattern {pattern}",
"NVDA Speech Viewer",
"text mode",
"object mode",
"NonVisual Desktop Access",
"A free and open source screen reader for Microsoft Windows",
"Copyright (C) {years} NVDA Contributors",
Expand Down