libghostty-vt 0.0.0
Loading...
Searching...
No Matches
event.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <ghostty/vt/types.h>
#include <ghostty/vt/allocator.h>

Go to the source code of this file.

Macros

#define GHOSTTY_MODS_SHIFT   (1 << 0)
#define GHOSTTY_MODS_CTRL   (1 << 1)
#define GHOSTTY_MODS_ALT   (1 << 2)
#define GHOSTTY_MODS_SUPER   (1 << 3)
#define GHOSTTY_MODS_CAPS_LOCK   (1 << 4)
#define GHOSTTY_MODS_NUM_LOCK   (1 << 5)
#define GHOSTTY_MODS_SHIFT_SIDE   (1 << 6)
#define GHOSTTY_MODS_CTRL_SIDE   (1 << 7)
#define GHOSTTY_MODS_ALT_SIDE   (1 << 8)
#define GHOSTTY_MODS_SUPER_SIDE   (1 << 9)

Typedefs

typedef struct GhosttyKeyEventImpl * GhosttyKeyEvent
typedef uint16_t GhosttyMods

Enumerations

enum  GhosttyKeyAction { GHOSTTY_KEY_ACTION_RELEASE = 0 , GHOSTTY_KEY_ACTION_PRESS = 1 , GHOSTTY_KEY_ACTION_REPEAT = 2 , GHOSTTY_KEY_ACTION_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE }
enum  GhosttyKey

Functions

GHOSTTY_API GhosttyResult ghostty_key_event_new (const GhosttyAllocator *allocator, GhosttyKeyEvent *event)
GHOSTTY_API void ghostty_key_event_free (GhosttyKeyEvent event)
GHOSTTY_API GhosttyResult ghostty_key_event_set_action (GhosttyKeyEvent event, GhosttyKeyAction action)
GHOSTTY_API GhosttyKeyAction ghostty_key_event_get_action (GhosttyKeyEvent event)
GHOSTTY_API GhosttyResult ghostty_key_event_set_key (GhosttyKeyEvent event, GhosttyKey key)
GHOSTTY_API GhosttyKey ghostty_key_event_get_key (GhosttyKeyEvent event)
GHOSTTY_API GhosttyResult ghostty_key_event_set_mods (GhosttyKeyEvent event, GhosttyMods mods)
GHOSTTY_API GhosttyMods ghostty_key_event_get_mods (GhosttyKeyEvent event)
GHOSTTY_API GhosttyResult ghostty_key_event_set_consumed_mods (GhosttyKeyEvent event, GhosttyMods consumed_mods)
GHOSTTY_API GhosttyMods ghostty_key_event_get_consumed_mods (GhosttyKeyEvent event)
GHOSTTY_API GhosttyResult ghostty_key_event_set_composing (GhosttyKeyEvent event, bool composing)
GHOSTTY_API bool ghostty_key_event_get_composing (GhosttyKeyEvent event)
GHOSTTY_API GhosttyResult ghostty_key_event_set_utf8 (GhosttyKeyEvent event, GhosttyString utf8)
GHOSTTY_API GhosttyString ghostty_key_event_get_utf8 (GhosttyKeyEvent event)
GHOSTTY_API GhosttyResult ghostty_key_event_set_unshifted_codepoint (GhosttyKeyEvent event, uint32_t codepoint)
GHOSTTY_API uint32_t ghostty_key_event_get_unshifted_codepoint (GhosttyKeyEvent event)

Detailed Description

Key event representation and manipulation.

Definition in file key/event.h.