1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-25 11:17:26 +00:00

Adds an interface allowing keyboard mappers to declare modifiers that are 'essential'.

i.e. ones that, if not delivered reliably, will cause the related machine to behave unexpectedly.
This commit is contained in:
Thomas Harte
2019-09-22 13:14:09 -04:00
parent e78b1dcf3c
commit a416bc0058
3 changed files with 14 additions and 1 deletions
+2
View File
@@ -11,6 +11,7 @@
#include <cstdint>
#include <string>
#include <set>
#include "../Inputs/Keyboard.hpp"
@@ -65,6 +66,7 @@ class MappedMachine: public Inputs::Keyboard::Delegate, public Machine {
class KeyboardMapper {
public:
virtual uint16_t mapped_key_for_key(Inputs::Keyboard::Key key) = 0;
virtual std::set<Inputs::Keyboard::Key> get_essential_modifiers() { return {}; }
};
/// Terminates a key sequence from the character mapper.