STRUCT LIRC_SCANCODE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, this is struct lirc_scancode(9), straight from the Kernel API Manual, and it is literally the decoded scancode with protocol for use with LIRC_MODE_SCANCODE. That’s the whole assignment. πŸ’…βœ¨

πŸŽ€ SYNOPSIS πŸŽ€

struct lirc_scancode {
    __u64 timestamp;
    __u16 flags;
    __u16 rc_proto;
    __u32 keycode;
    __u64 scancode;
};

πŸ’– Members πŸ’–

  • timestamp β€” the timestamp in nanoseconds using CLOCK_MONOTONIC for when the IR was decoded. Nanoseconds, bestie β€” it’s giving precise. ⏱️
  • flags β€” this should be 0 for transmit. When receiving scancodes, LIRC_SCANCODE_FLAG_TOGGLE or LIRC_SCANCODE_FLAG_REPEAT can be set depending on the protocol. Protocol-dependent behavior, no cap. 🚩
  • rc_proto β€” see enum rc_proto. πŸ‘€
  • keycode β€” the translated keycode. Set it to 0 for transmit. 🎹
  • scancode β€” the scancode received or to be sent. πŸ“‘

🌈 SEE ALSO 🌈

  • Kernel file ./include/uapi/linux/lirc.h
  • enum rc_proto(9)

okay bye, ily β€” this was struct lirc_scancode(9), source/version ./include/uapi/linux, dated October 2026 πŸ’œπŸ¦‹πŸŽ€

πŸ“¦ where this page comes from