Merge branch 'singlekey-endian' of https://github.com/jamessan/kitty

Fixes #5802
This commit is contained in:
Kovid Goyal 2022-12-23 08:12:23 +05:30
commit 61ceb12e07
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -301,9 +301,17 @@ typedef uint64_t keybitfield;
#endif
typedef union Key {
struct {
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
keybitfield mods : MOD_BITS;
keybitfield is_native: 1;
keybitfield key : KEY_BITS;
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
keybitfield key : KEY_BITS;
keybitfield is_native: 1;
keybitfield mods : MOD_BITS;
#else
#error "Unsupported endianness"
#endif
};
keybitfield val;
} Key;