open
https://gitlab.synchro.net/main/sbbs/-/work_items/1292
## Summary
Add ARS keywords for terminal capabilities that the Terminal Server already detects but that ARS cannot test, starting with audio (`SOUND`) and mouse (`MOUSE`).
## Motivation
The new sound @-codes (`@SOUND:`, `@MUSIC:`, etc.) are silently skipped for terminals that cannot decode audio, and for users who turned sound off. A display file has no way to make the same decision for content *around* the sound.
Concrete case: a logoff display file that plays a 12-second clip with `@SOUND:` must keep the connection open until the clip ends, because SyncTERM stops all audio at disconnect. A plain `@WAIT:100@` makes every caller wait, including those who hear nothing. The only workaround today is a JS module run with `@EXEC:` that checks `console.audio_files` and `user.settings & USER_NO_SOUND`. With a keyword, the file could do it inline:
```
@SOUND:clip.ogg@ ... @SHOW:SOUND@@WAIT:100@@SHOW@
```
## Existing terminal keywords
`ANSI`, `RIP`, `PETSCII`, `ASCII`, `UTF8`, `CP437`, `TERM`, `COLS`, `ROWS` (session evaluation in `chk_ar.cpp`, parsing in `ars.c`, sessionless evaluation in `userdat.c`).
## Proposed keywords
| Keyword | True when | Source |
|---|---|---|
| `SOUND` | terminal can decode audio files AND the user has not set "suppress BBS-initiated sound" | `term->audio_files && !(useron.misc & NO_SOUND)`, the same gate the `@SOUND:` code uses in `atcodes.cpp` |
| `MOUSE` | terminal supports mouse hot-spots | `term->supports(MOUSE)` (`@MOUSE@` already prints On/Off, but there is nothing to gate on) |
| `ICE` (optional) | bright-background (iCE color) support | `term->supports(ICE_COLOR)` |
| `COLOR` (optional) | color codes are sent | `term->supports(COLOR)` |
Plain keywords, like the existing set, rather than a parameterized `CAP=...` form. The existing `NoAccessTerminal` text works for each of them.
## Points to settle
- **Sessionless evaluation (`userdat.c`)**, used where there is no live terminal (e.g. web/FTP servers): `SOUND` should be false, or follow just the user's `NO_SOUND` setting, the way `ANSI` falls back to the user's stored terminal flags. `MOUSE`/`ICE`/`COLOR` can follow the stored `user->misc` flags.
- **Detection timing:** audio support is detected by a probe when the user connects. A `SOUND` check evaluated before that probe completes (e.g. in the earliest pre-logon display files) would be false; document when the keyword is reliable.
- **Graphics (sixel/JXL) is out of scope for now:** that support is detected in `cterm_lib.js` and by the doors, not stored on the terminal object, so a keyword for it would first need the detection result recorded server-side.
- Documentation: wiki `access:requirements` page, and a `docs/v322_new.md` bullet.
Related: #1049 (user properties in ARS).
- *Authored by Claude (Claude Code), on behalf of @rswindell*
--- SBBSecho 3.38-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)