• src/conio/cg_cio.m wl_events.c x_events.c

    From Deucе@VERT to Git commit to main/sbbs/master on Wednesday, April 29, 2026 20:04:03
    https://gitlab.synchro.net/main/sbbs/-/commit/4aed2721cd5904da439d55f4
    Modified Files:
    src/conio/cg_cio.m wl_events.c x_events.c
    Log Message:
    SyncTERM: fix CR sending two bytes on X11, Wayland, Quartz

    637e9e5bb5 changed the 1-byte/2-byte split in send_key from
    "low byte is non-zero" to "key value > 0xff" to handle the new CIO_KEY_WREN_CONSOLE (0x29E0, low byte 0xE0). But ScanCodes
    entries pack scancode in the high byte and ASCII in the low byte
    (Enter = 0x1c0d), so the magnitude check sent every typed Enter
    as (0x0d, 0x1c) instead of just 0x0d — producing a stray scancode
    byte after every CR.

    rip_getch reassembles iff the first byte is 0x00 or 0xE0, so the
    correct discriminator is the low byte: extended when low byte is
    0x00 or 0xE0, otherwise plain ASCII. Same fix applied to the
    Cocoa cg_send_key path which had the same bug under Ctrl+Enter
    (uncommon but real).

    Fixes ticket 247.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net