Skip to content

Fix clipboard display bug in browse mode if clipboard is empty - #96

Open
ibrahim-s wants to merge 2 commits into
nvdaes:mainfrom
ibrahim-s:FixTextBrowseMode
Open

ibrahim-s wants to merge 2 commits into
nvdaes:mainfrom
ibrahim-s:FixTextBrowseMode

Conversation

@ibrahim-s

Copy link
Copy Markdown

Link to issue number:

Fixes #95

Summary of the issue:

Current NVDA versions no longer expose windll through the winUser module.
Calling:

winUser.windll.user32.EnumClipboardFormats(0)
raises:
AttributeError: module 'winUser' has no attribute 'windll'
when executing the command to show clipboard raw text.

### Description of how this pull request fixes the issue:

The change replaces the call with:
from ctypes import windll
windll.user32.EnumClipboardFormats(0)
which restores compatibility with current NVDA versions.

### Testing performed:
 - tested with empty clipboard,and the appropriate message was heard, denoting that clipboard is empty.
 - Copy a file, and test the gesture to display text in browse mode, the appropriate message heard, denoting that clipboard has content, but couldn't be displayed in browse mode.
 
### Known issues with pull request:
None
### Change log entry:
I noticed that the issue was in NVDA 2026.1 and not reported, and since it is only ppresent if clipboard empty, may be it is very specific and aside issue, and no need for changelog.

@ibrahim-s
ibrahim-s requested a review from nvdaes as a code owner September 18, 2026 17:56
@ibrahim-s

Copy link
Copy Markdown
Author

Hi @nvdaes
Really, I am not sure if recent NVDA releases would handle or deal with the issue in a different way, so feel free to change anything, since you know recent api changes more than me, and thank you for giving me this opportunity .
kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Error while trying to display textual content in browse mode,while clipboard is empty

1 participant