Read recent messages in the Discord desktop client without moving your focus or your caret. You can be typing in the compose box, press a hotkey to hear an earlier message, and carry on typing where you left off.
The add-on loads automatically when you are in the Discord desktop application. It does not affect Discord in a web browser.
Alt plus a number reads one of the last ten messages in the channel or direct message you currently have open:
Your focus and caret do not move, so these keys are safe to press while composing a message.
Discord only keeps the messages near your current scroll position available to a screen reader, so fewer than ten may be readable. When that happens the add-on tells you how many are loaded rather than reporting an error. If you are not in a channel or direct message at all, it says so quickly instead of searching.
Alt+D moves focus to the first unread message, which is the message just after Discord's "New messages" marker. NVDA reads the message you land on, and Discord's own Up and Down arrows then walk through the rest.
Unlike the reading hotkeys, this one deliberately moves your focus, because being taken to the message is the point of the command.
If there is no unread marker in the channel, the add-on tells you there are no new messages. If the marker is scrolled far out of view it may not be findable, and the add-on says that too.
Alt+Shift+N cycles automatic reading of incoming messages in the channel you have open, through three modes:
Switching this on does not read the messages already on screen. Only messages that arrive afterwards are announced. The same is true when you change channel: the existing conversation is never dumped at you.
Automatic reading only happens while Discord is the focused application, and only for the channel you have open. The mode is remembered when NVDA restarts.
You can also set the starting mode without using the hotkey. Open the NVDA menu, choose Preferences, then Settings, and select the Discord Message Hotkeys category. The setting there and the Alt+Shift+N hotkey control the same option, so they always agree.
All of these commands can be reassigned. In the NVDA menu choose Preferences, then Input Gestures, and look under the Discord Message Hotkeys category.
NVDA+Ctrl+Shift+F10 saves a description of Discord's current
accessibility structure to a file named discord_nvda_dump.txt in
your Downloads folder, and tells you when it has finished. Attaching that file
to a bug report makes a problem far easier to diagnose, because it shows exactly
how Discord was presenting the message list at the time.
This command is intentionally awkward to press, because the file it writes contains message text. If you use it often, you can give it an easier key under Preferences, then Input Gestures.
Please be aware that this dump contains the text of messages that were on screen when you pressed the key. Read through it, or remove anything private, before sharing it publicly.
Copyright (C) Khai. This add-on is free software, released under the GNU
General Public License version 2. See the file LICENSE in the
source repository for the full terms.