Serialization/deserialization of mappings

This commit is contained in:
offtkp 2024-05-01 19:47:34 +03:00
parent 21492f81a9
commit 5f3c5fe307
5 changed files with 170 additions and 8 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include <array>
#include <optional>
#include <string>
#include "helpers.hpp"
#include "kernel_types.hpp"
@ -32,7 +33,10 @@ namespace HID::Keys {
CirclePadUp = 1 << 30, // Y >= 41
CirclePadDown = 1u << 31 // Y <= -41
};
}
const char* keyToName(u32 key);
u32 nameToKey(std::string name);
} // namespace HID::Keys
// Circular dependency because we need HID to spawn events
class Kernel;