Skip to content

Commit

Permalink
kitty keyboard: send initial query #2131
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Aug 31, 2021
1 parent 0ee5ba4 commit 959e2c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/termdesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,15 @@ init_terminfo_esc(tinfo* ti, const char* name, escape_e idx,
// which can be identified directly, sans queries.
#define KITTYQUERY "\x1b_Gi=1,a=q;\x1b\\"

// the kitty keyboard protocol allows unambiguous, complete identification of
// input events. this queries for the level of support.
#define KBDQUERY "\x1b[?u"

// these queries (terminated with a Primary Device Attributes, to which
// all known terminals reply) hopefully can uniquely and unquestionably
// identify the terminal to which we are talking.
#define IDQUERIES KITTYQUERY \
KBDQUERY \
TRIDEVATTR \
XTVERSION \
XTGETTCAPTN \
Expand Down

0 comments on commit 959e2c1

Please sign in to comment.