robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Justin M. Keyesfix(lua): vim.keycode cleanup #408176f5fae3f8c

master
691 B14 linesraw
1#pragma once
2
3#include "nvim/api/private/defs.h"  // IWYU pragma: keep
4
5/// Structured info for a key chord.
6///
7/// XXX: The `key`/`key_alt` strings may point into `key_mem` or into a static buffer owned by
8/// str2special()/get_special_key(). All are only valid until the next such call.
9struct keychord {
10  int mods;         ///< Modifier mask (see `mod_mask_table`), e.g. `<C-A>` yields Ctrl and Shift.
11  char key_mem;     ///< Backing storage for a single-byte `key`/`key_alt` (see above).
12  String key;       ///< Key without modifiers, normalized, e.g. `<C-A>` => `a`, `<lt>` => `<`.
13  String key_alt;   ///< Alternative spelling of `key`, e.g. `lt` for `<`. Empty (NULL) if same.
14};