NOTICE: Vendored AsyncVNC Code

This directory contains code vendored from the AsyncVNC project:
- Original Repository: https://github.com/barneygale/asyncvnc
- Original License: GPL-3.0
- Original Copyright: Barney Gale
- Modified by: Canonical Ltd., 2025-2026

The original AsyncVNC is licensed under the GNU General Public License v3.0.
A copy of this license should be included in the LICENSE file in this directory.

MODIFICATIONS:
- Fixed shifted keys issue in VNC with QEMU
  * Replaced key_codes dictionary with key_sequences dictionary
  * Added proper handling for shifted characters (uppercase letters, symbols)
  * Added key aliases (Ctrl for Control, Enter for Return)
  * Implemented proper key sequence handling for QEMU VNC compatibility
- Re-worked message handling with struct
  * Replaced int.to_bytes concatenation with struct.pack for better performance
  * Added keyboard_struct and mouse_struct for message formatting
  * Improved message handling efficiency and readability
- The code is maintained as part of YARF: it is linted, type-checked and
  fully covered by the YARF test suite
- Removed the features unused by YARF, reducing the attack surface
  * Only the "None" security type is supported: the VNC password (DES) and
    Apple Remote Desktop (RSA/AES-ECB) authentications were removed, along
    with the dependency on cryptography, as YARF never passes credentials
  * Removed clipboard writing, screen detection, click and scroll helpers,
    drain() and the custom connection opener
- The connection is closed if the handshake fails
- Authentication failures report the reason sent by the server
- Added type hints and Google style docstrings

The modifications address QEMU VNC spec violations where QEMU passes through
key-codes verbatim rather than interpreting characters with locale awareness.
The fix assumes US locale and implicitly holds shift for shifted key symbols.

All original copyright notices and attribution are preserved.
