ENUM SDTX_EVENT_CODE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… enum sdtx_event_code β€” like, the NAME bit

okay so bestie, this is enum sdtx_event_code from the Kernel API Manual, and it's literally just "Code describing the type of an event." that's it, that's the whole vibe πŸŽ€


✨ SYNOPSIS ✨

okay here's the whole enum, exactly as it lives, no cap:

enum sdtx_event_code {
    SDTX_EVENT_REQUEST ,
    SDTX_EVENT_CANCEL ,
    SDTX_EVENT_BASE_CONNECTION ,
    SDTX_EVENT_LATCH_STATUS ,
    SDTX_EVENT_DEVICE_MODE

};

like, five whole members. she's giving minimal but iconic πŸ’…


🧚 Constants 🧚

every single one, explained, periodt:

  • SDTX_EVENT_REQUEST β€” the detachment request event type. someone's asking to detach, this is the code for that. 🫢
  • SDTX_EVENT_CANCEL β€” the cancel detachment process event type. nvm, they changed their mind, cancel that detachment. 😭
  • SDTX_EVENT_BASE_CONNECTION β€” the base/clipboard connection change event type. connection changed, base or clipboard, that's the tea. 🌸
  • SDTX_EVENT_LATCH_STATUS β€” the latch status change event type. latch status moved, noted. ⭐
  • SDTX_EVENT_DEVICE_MODE β€” the device mode change event type. device mode switched up on you. πŸ¦‹

πŸ’– Description πŸ’–

so this whole enum is used inside struct sdtx_event to describe the type of the event, iykyk. that's her job. πŸ‘‘

and listen β€” further event codes are reserved for future use, so don't go thinking these five are the whole universe. more are coming. πŸ™ˆ

⚠️ important bestie note: any event parser should be able to gracefully handle unknown events, i.e. by simply skipping them. don't crash, don't panic, just skip. main character energy is staying calm when you see a code you don't recognize. πŸ’€

if you want the details on the individual event types, consult the DTX user-space interface documentation β€” that's where the lore lives. πŸ“–


🌈 SEE ALSO 🌈

go read these next, fr fr:

  • Kernel file ./include/uapi/linux/surface_aggregator/dtx.h enum
  • sdtx_device_mode(9)
  • struct sdtx_event(9)
  • struct sdtx_base_info(9)

and that's the page, bestie 🫢 this lil' slice of the Kernel API Manual came from ./include/uapi/linux/surface_a... and it's dated October 2026 β€” slay, go forth and parse your events gracefully βœ¨πŸŽ€πŸ’œ

πŸ“¦ where this page comes from