/* See LICENSE file for copyright and license details. */ #ifndef COMMON_H_ #define COMMON_H_ #include #include #include #include #include #include #include #define COMMA , #define IS_KEY(INPUT, KEY)\ ((INPUT)->keypress.key == LIBTERMINPUT_SYMBOL &&\ toupper((INPUT)->keypress.symbol[0]) == toupper((KEY)) &&\ !(INPUT)->keypress.symbol[1]) #define IS_CTRL_KEY(INPUT, KEY)\ (((INPUT)->keypress.mods & (enum libterminput_mod)~LIBTERMINPUT_SHIFT) == LIBTERMINPUT_CTRL &&\ IS_KEY((INPUT), (KEY))) #endif