HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //home/ubuntu/neovim/src/nvim/tui/input.h
#pragma once

#include <stdbool.h>
#include <stdint.h>
#include <uv.h>

#include "nvim/event/defs.h"
#include "nvim/tui/input_defs.h"  // IWYU pragma: keep
#include "nvim/tui/tui_defs.h"
#include "nvim/types_defs.h"
#include "termkey/termkey.h"

typedef enum {
  kKeyEncodingLegacy,  ///< Legacy key encoding
  kKeyEncodingKitty,   ///< Kitty keyboard protocol encoding
  kKeyEncodingXterm,   ///< Xterm's modifyOtherKeys encoding (XTMODKEYS)
} KeyEncoding;

#define KEY_BUFFER_SIZE 0x1000
typedef struct {
  int in_fd;
  // Phases: -1=all 0=disabled 1=first-chunk 2=continue 3=last-chunk
  int8_t paste;
  bool ttimeout;

  bool waiting_for_kkp_response;  ///< True if we are expecting to receive a response to a query for
                                  ///< Kitty keyboard protocol support

  KeyEncoding key_encoding;       ///< The key encoding used by the terminal emulator

  OptInt ttimeoutlen;
  TermKey *tk;
  TermKey_Terminfo_Getstr_Hook *tk_ti_hook_fn;  ///< libtermkey terminfo hook
  uv_timer_t timer_handle;
  Loop *loop;
  RStream read_stream;
  TUIData *tui_data;
  char key_buffer[KEY_BUFFER_SIZE];
  size_t key_buffer_len;
} TermInput;

#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "tui/input.h.generated.h"
#endif