Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: add console input record event member functions #228

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 21, 2024

  1. windows: add console input api

    This adds multiple functions to read, count, and discard console
    input events. Using `ReadConsoleInput` instead of `ReadConsole` or
    `ReadFile` is necessary to capture extended events such as window
    resize, focus, and extended key and mouse events.
    
    This also define console event types and structs.
    aymanbagabas committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    1ba63fc View commit details
    Browse the repository at this point in the history
  2. windows: add console input record event member functions

    Events in `INPUT_RECORD` are defined as `union` with multiple
    members. Since Go doesn't have a notion of `union`s, we need
    to decode the input event into their respective types. Here,
    we use member functions that match the union type names to get
    the respective event type.
    aymanbagabas committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    a8df59a View commit details
    Browse the repository at this point in the history