<commit_before>//
//  Keyboard.hpp
//  Clock Signal
//
//  Created by <NAME> on 10/9/17.
//  Copyright 2017 <NAME>. All rights reserved.
//

#ifndef Inputs_Keyboard_hpp
#define Inputs_Keyboard_hpp

#include <vector>
#include <set>

namespace Inputs {

/*!
	Provides an intermediate idealised model of a modern-era computer keyboard
	(so, heavily indebted to the current Windows and Mac layouts), allowing a host
	machine to toggle states, while an interested party either observes or polls.
*/
class Keyboard {
	public:
		enum class Key {
			Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PrintScreen, ScrollLock, Pause,
			BackTick, k1, k2, k3, k4, k5, k6, k7, k8, k9, k0, Hyphen, Equals, Backspace,
			Tab, Q, W, E, R, T, Y, U, I, O, P, OpenSquareBracket, CloseSquareBracket, Backslash,
			CapsLock, A, S, D, F, G, H, J, K, L, Semicolon, Quote, Hash, Enter,
			LeftShift, Z, X, C, V, B, N, M, Comma, FullStop, ForwardSlash, RightShift,
			LeftControl, LeftOption, LeftMeta, Space, RightMeta, RightOption, RightControl,
			Left, Right, Up, Down,
			Insert, Home, PageUp, Delete, End, PageDown,
			NumLock, KeypadSlash, KeypadAsterisk, KeypadDelete,
			Keypad7, Keypad8, Keypad9, KeypadPlus,
			Keypad4, Keypad5, Keypad6, KeypadMinus,
			Keypad1, Keypad2, Keypad3, KeypadEnter,
			Keypad0, KeypadDecimalPoint, KeypadEquals,
			Help,

			Max = Help
		};

		/// Constructs a Keyboard that declares itself to observe all keys.
		Keyboard(const std::set<Key> &essential_modifiers = {});

		/// Constructs a Keyboard that declares itself to observe only members of @c observed_keys.
		Keyboard(const std::set<Key> &observed_keys, const std::set<Key> &essential_modifiers);

		// Host interface.<commit_msg>Ensure MultiKeyboard deconstructs properly.<commit_after>//
//  Keyboard.hpp
//  Clock Signal
//
//  Created by <NAME> on 10/9/17.
//  Copyright 2017 <NAME>. All rights reserved.
//

#ifndef Inputs_Keyboard_hpp
#define Inputs_Keyboard_hpp

#include <vector>
#include <set>

namespace Inputs {

/*!
	Provides an intermediate idealised model of a modern-era computer keyboard
	(so, heavily indebted to the current Windows and Mac layouts), allowing a host
	machine to toggle states, while an interested party either observes or polls.
*/
class Keyboard {
	public:
		enum class Key {
			Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PrintScreen, ScrollLock, Pause,
			BackTick, k1, k2, k3, k4, k5, k6, k7, k8, k9, k0, Hyphen, Equals, Backspace,
			Tab, Q, W, E, R, T, Y, U, I, O, P, OpenSquareBracket, CloseSquareBracket, Backslash,
			CapsLock, A, S, D, F, G, H, J, K, L, Semicolon, Quote, Hash, Enter,
			LeftShift, Z, X, C, V, B, N, M, Comma, FullStop, ForwardSlash, RightShift,
			LeftControl, LeftOption, LeftMeta, Space, RightMeta, RightOption, RightControl,
			Left, Right, Up, Down,
			Insert, Home, PageUp, Delete, End, PageDown,
			NumLock, KeypadSlash, KeypadAsterisk, KeypadDelete,
			Keypad7, Keypad8, Keypad9, KeypadPlus,
			Keypad4, Keypad5, Keypad6, KeypadMinus,
			Keypad1, Keypad2, Keypad3, KeypadEnter,
			Keypad0, KeypadDecimalPoint, KeypadEquals,
			Help,

			Max = Help
		};

		/// Constructs a Keyboard that declares itself to observe all keys.
		Keyboard(const std::set<Key> &essential_modifiers = {});

		/// Constructs a Keyboard that declares itself to observe only members of @c observed_keys.
		Keyboard(const std::set<Key> &observed_keys, const std::set<Key> &essential_modifiers);

		virtual ~Keyboard() {}

		// Host interface.
{'fraction_non_alphanumeric': 0.1154508902929351, 'fraction_numerical': 0.02527283170591614, 'mean_word_length': 4.099560761346998, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3698362', 'n_tokens_mistral': 1388, 'n_tokens_neox': 1230, 'n_words': 422}