tmux  3.2a
About: tmux is a terminal multiplexer that lets you switch easily between several programs in one terminal.
  Fossies Dox: tmux-3.2a.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

tty-keys.c File Reference
#include <sys/types.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <ctype.h>
#include <limits.h>
#include <resolv.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include "tmux.h"
Include dependency graph for tty-keys.c:

Go to the source code of this file.

Data Structures

struct  tty_default_key_raw
 
struct  tty_default_key_xterm
 
struct  tty_default_key_code
 

Functions

static void tty_keys_add1 (struct tty_key **, const char *, key_code)
 
static void tty_keys_add (struct tty *, const char *, key_code)
 
static void tty_keys_free1 (struct tty_key *)
 
static struct tty_keytty_keys_find1 (struct tty_key *, const char *, size_t, size_t *)
 
static struct tty_keytty_keys_find (struct tty *, const char *, size_t, size_t *)
 
static int tty_keys_next1 (struct tty *, const char *, size_t, key_code *, size_t *, int)
 
static void tty_keys_callback (int, short, void *)
 
static int tty_keys_extended_key (struct tty *, const char *, size_t, size_t *, key_code *)
 
static int tty_keys_mouse (struct tty *, const char *, size_t, size_t *, struct mouse_event *)
 
static int tty_keys_clipboard (struct tty *, const char *, size_t, size_t *)
 
static int tty_keys_device_attributes (struct tty *, const char *, size_t, size_t *)
 
static int tty_keys_extended_device_attributes (struct tty *, const char *, size_t, size_t *)
 
void tty_keys_build (struct tty *tty)
 
void tty_keys_free (struct tty *tty)
 
int tty_keys_next (struct tty *tty)
 

Variables

static const struct tty_default_key_raw tty_default_raw_keys []
 
static const struct tty_default_key_xterm tty_default_xterm_keys []
 
static const key_code tty_default_xterm_modifiers []
 
static const struct tty_default_key_code tty_default_code_keys []
 

Function Documentation

◆ tty_keys_add()

static void tty_keys_add ( struct tty tty,
const char *  s,
key_code  key 
)
static

◆ tty_keys_add1()

static void tty_keys_add1 ( struct tty_key **  tkp,
const char *  s,
key_code  key 
)
static

Definition at line 438 of file tty-keys.c.

References tty_key::ch, key, tty_key::key, KEYC_UNKNOWN, tty_key::left, tty_key::next, tty_key::right, and xcalloc().

Referenced by tty_keys_add().

◆ tty_keys_build()

◆ tty_keys_callback()

static void tty_keys_callback ( int  fd,
short  events,
void *  data 
)
static

Definition at line 850 of file tty-keys.c.

References tty::flags, tty_keys_next(), and TTY_TIMER.

Referenced by tty_keys_next().

◆ tty_keys_clipboard()

static int tty_keys_clipboard ( struct tty tty,
const char *  buf,
size_t  len,
size_t *  size 
)
static

Definition at line 1141 of file tty-keys.c.

References b64_pton(), log_debug(), paste_add(), and xmalloc().

Referenced by tty_keys_next().

◆ tty_keys_device_attributes()

static int tty_keys_device_attributes ( struct tty tty,
const char *  buf,
size_t  len,
size_t *  size 
)
static

◆ tty_keys_extended_device_attributes()

static int tty_keys_extended_device_attributes ( struct tty tty,
const char *  buf,
size_t  len,
size_t *  size 
)
static

◆ tty_keys_extended_key()

static int tty_keys_extended_key ( struct tty tty,
const char *  buf,
size_t  len,
size_t *  size,
key_code key 
)
static

◆ tty_keys_find()

static struct tty_key * tty_keys_find ( struct tty tty,
const char *  buf,
size_t  len,
size_t *  size 
)
static

Definition at line 553 of file tty-keys.c.

References tty::key_tree, and tty_keys_find1().

Referenced by tty_keys_add(), and tty_keys_next1().

◆ tty_keys_find1()

static struct tty_key * tty_keys_find1 ( struct tty_key tk,
const char *  buf,
size_t  len,
size_t *  size 
)
static

Definition at line 561 of file tty-keys.c.

References tty_key::ch, tty_key::key, KEYC_UNKNOWN, tty_key::left, tty_key::next, and tty_key::right.

Referenced by tty_keys_find().

◆ tty_keys_free()

void tty_keys_free ( struct tty tty)

Definition at line 533 of file tty-keys.c.

References tty::key_tree, and tty_keys_free1().

Referenced by tty_close(), and tty_keys_build().

◆ tty_keys_free1()

static void tty_keys_free1 ( struct tty_key tk)
static

Definition at line 540 of file tty-keys.c.

References tty_key::left, tty_key::next, and tty_key::right.

Referenced by tty_keys_free().

◆ tty_keys_mouse()

static int tty_keys_mouse ( struct tty tty,
const char *  buf,
size_t  len,
size_t *  size,
struct mouse_event m 
)
static

◆ tty_keys_next()

◆ tty_keys_next1()

static int tty_keys_next1 ( struct tty tty,
const char *  buf,
size_t  len,
key_code key,
size_t *  size,
int  expired 
)
static

Variable Documentation

◆ tty_default_code_keys

const struct tty_default_key_code tty_default_code_keys[]
static

Definition at line 246 of file tty-keys.c.

Referenced by tty_keys_build().

◆ tty_default_raw_keys

const struct tty_default_key_raw tty_default_raw_keys[]
static

Definition at line 58 of file tty-keys.c.

Referenced by tty_keys_build().

◆ tty_default_xterm_keys

const struct tty_default_key_xterm tty_default_xterm_keys[]
static

Definition at line 58 of file tty-keys.c.

Referenced by tty_keys_build().

◆ tty_default_xterm_modifiers

const key_code tty_default_xterm_modifiers[]
static
Initial value:
= {
0,
0,
0x00400000000000ULL ,
0x00100000000000ULL | 0x08000000000000ULL ,
0x00400000000000ULL | 0x00100000000000ULL | 0x08000000000000ULL ,
0x00200000000000ULL ,
0x00400000000000ULL | 0x00200000000000ULL ,
0x00100000000000ULL | 0x08000000000000ULL | 0x00200000000000ULL ,
0x00400000000000ULL | 0x00100000000000ULL | 0x08000000000000ULL | 0x00200000000000ULL ,
0x00100000000000ULL | 0x08000000000000ULL
}

Definition at line 246 of file tty-keys.c.

Referenced by tty_keys_build().