libghostty
Loading...
Searching...
No Matches
encoder.h
Go to the documentation of this file.
1
6
7#ifndef GHOSTTY_VT_KEY_ENCODER_H
8#define GHOSTTY_VT_KEY_ENCODER_H
9
10#include <stddef.h>
11#include <stdint.h>
12#include <ghostty/vt/result.h>
15
25
35typedef uint8_t GhosttyKittyKeyFlags;
36
38#define GHOSTTY_KITTY_KEY_DISABLED 0
39
41#define GHOSTTY_KITTY_KEY_DISAMBIGUATE (1 << 0)
42
44#define GHOSTTY_KITTY_KEY_REPORT_EVENTS (1 << 1)
45
47#define GHOSTTY_KITTY_KEY_REPORT_ALTERNATES (1 << 2)
48
50#define GHOSTTY_KITTY_KEY_REPORT_ALL (1 << 3)
51
53#define GHOSTTY_KITTY_KEY_REPORT_ASSOCIATED (1 << 4)
54
56#define GHOSTTY_KITTY_KEY_ALL (GHOSTTY_KITTY_KEY_DISAMBIGUATE | GHOSTTY_KITTY_KEY_REPORT_EVENTS | GHOSTTY_KITTY_KEY_REPORT_ALTERNATES | GHOSTTY_KITTY_KEY_REPORT_ALL | GHOSTTY_KITTY_KEY_REPORT_ASSOCIATED)
57
66typedef enum {
76
85typedef enum {
88
91
94
97
100
103
107
122
134
153
219GhosttyResult ghostty_key_encoder_encode(GhosttyKeyEncoder encoder, GhosttyKeyEvent event, char *out_buf, size_t out_buf_size, size_t *out_len);
220
221#endif /* GHOSTTY_VT_KEY_ENCODER_H */
uint8_t GhosttyKittyKeyFlags
Definition encoder.h:35
struct GhosttyKeyEncoder * GhosttyKeyEncoder
Definition encoder.h:24
GhosttyResult ghostty_key_encoder_new(const GhosttyAllocator *allocator, GhosttyKeyEncoder *encoder)
GhosttyKeyEncoderOption
Definition encoder.h:85
GhosttyOptionAsAlt
Definition encoder.h:66
void ghostty_key_encoder_setopt(GhosttyKeyEncoder encoder, GhosttyKeyEncoderOption option, const void *value)
struct GhosttyKeyEvent * GhosttyKeyEvent
Definition event.h:24
GhosttyResult ghostty_key_encoder_encode(GhosttyKeyEncoder encoder, GhosttyKeyEvent event, char *out_buf, size_t out_buf_size, size_t *out_len)
void ghostty_key_encoder_free(GhosttyKeyEncoder encoder)
@ GHOSTTY_KEY_ENCODER_OPT_IGNORE_KEYPAD_WITH_NUMLOCK
Definition encoder.h:93
@ GHOSTTY_KEY_ENCODER_OPT_KITTY_FLAGS
Definition encoder.h:102
@ GHOSTTY_KEY_ENCODER_OPT_CURSOR_KEY_APPLICATION
Definition encoder.h:87
@ GHOSTTY_KEY_ENCODER_OPT_ALT_ESC_PREFIX
Definition encoder.h:96
@ GHOSTTY_KEY_ENCODER_OPT_KEYPAD_KEY_APPLICATION
Definition encoder.h:90
@ GHOSTTY_KEY_ENCODER_OPT_MODIFY_OTHER_KEYS_STATE_2
Definition encoder.h:99
@ GHOSTTY_KEY_ENCODER_OPT_MACOS_OPTION_AS_ALT
Definition encoder.h:105
@ GHOSTTY_OPTION_AS_ALT_FALSE
Definition encoder.h:68
@ GHOSTTY_OPTION_AS_ALT_TRUE
Definition encoder.h:70
@ GHOSTTY_OPTION_AS_ALT_LEFT
Definition encoder.h:72
@ GHOSTTY_OPTION_AS_ALT_RIGHT
Definition encoder.h:74
GhosttyResult
Definition result.h:13