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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user