8 if (x.
sym.sym != y.
sym.sym)
return false;
9 if (x.
sym.scancode != y.
sym.scancode)
return false;
10 if (x.
sym.mod != y.
sym.mod)
return false;
11 if (x.
sym.unused != y.
sym.unused)
return false;
16static void test(
const std::string& name1,
SDLKey code1,
bool canonical)
18 std::string name2 = code1.
toString();
20 CHECK(name2 == name1);
25 CHECK(equal(*code2, code1));
27 std::string name3 = code2->toString();
28 CHECK(name3 == name2);
32 CHECK(equal(*code3, *code2));
void test(const IterableBitSet< N > &s, std::initializer_list< size_t > list)
This file implemented 3 utility functions:
static std::optional< SDLKey > fromString(std::string_view name)
static SDLKey createDown(SDL_Keycode code)
std::string toString() const
static SDLKey create(SDL_Keycode code, bool down, uint16_t mod=0)