openMSX
KeyCodeSetting.hh
Go to the documentation of this file.
1 #ifndef KEYCODESETTING_HH
2 #define KEYCODESETTING_HH
3 
4 #include "Setting.hh"
5 #include "Keys.hh"
6 
7 namespace openmsx {
8 
9 class KeyCodeSetting final : public Setting
10 {
11 public:
12  KeyCodeSetting(CommandController& commandController,
13  string_view name, string_view description,
14  Keys::KeyCode initialValue);
15 
16  string_view getTypeString() const override;
17 
18  Keys::KeyCode getKey() const noexcept;
19 };
20 
21 } // namespace openmsx
22 
23 #endif
Keys::KeyCode getKey() const noexcept
KeyCode
Constants that identify keys and key modifiers.
Definition: Keys.hh:26
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
KeyCodeSetting(CommandController &commandController, string_view name, string_view description, Keys::KeyCode initialValue)
This class implements a (close approximation) of the std::string_view class.
Definition: string_view.hh:16
string_view getTypeString() const override
Returns a string describing the setting type (integer, string, ..) Could be used in a GUI to pick an ...