S3D_KEY_EVENT(9)

✨ s3d_key_event ✨

okay so bestie, welcome to the s3d_key_event page from the s3d manual πŸ’– this is a section 9 (kernel/dev) situation, and it's literally just here to tell you what a key event looks like. no drama, no cap.


🌸 NAME 🌸

s3d_key_event β€” key event information 🎹✨

like. it's the struct that holds what key you pressed. that's the whole vibe.


πŸŽ€ SYNOPSIS πŸŽ€

#include <s3d.h>

yes bestie you gotta include the header first, that's just the rules πŸ’…


πŸ¦‹ STRUCTURE MEMBERS πŸ¦‹

here's the whole struct, look at her:

struct s3d_key_event {
     uint16_t keysym;
     uint16_t unicode;
     uint16_t modifier;
     uint16_t state;
}

four uint16_t members, all of them, no skips, we love a tidy little struct 🫢

  • keysym β€” the keysym, a uint16_t 🎹
  • unicode β€” the unicode value, also a uint16_t πŸ”€
  • modifier β€” the modifier, uint16_t, she's holding the modifier info πŸ’…
  • state β€” the state, uint16_t, doing state things ⭐
ngl every single one of these is a uint16_t. all four. that's not me being lazy that's just the struct fr fr.

🌈 DESCRIPTION 🌈

so here's the tea β˜•: you can use this on the buffer of an event of type S3D_EVENT_KEY*. that's it. that's the whole description. iconic honestly.

like, when you get one of those S3D_EVENT_KEY* events, this is the struct you cast that buffer to. main character energy πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Simon Wunderlich β€” Author of s3d 🫑✨


and that's the whole page bestie, we ate and left no crumbs πŸ’…πŸŒΈ

this was s3d_key_event from the s3d manual, section 9, page S3D_KEY_EVENT(9) πŸŽ€ ty for reading, ily, go press some keys πŸ¦‹πŸ’–