openMSX
KeyboardSettings.hh
Go to the documentation of this file.
1 #ifndef KEYBOARDSETTINGS_HH
2 #define KEYBOARDSETTINGS_HH
3 
4 #include "Keys.hh"
5 #include <memory>
6 
7 namespace openmsx {
8 
9 class CommandController;
10 class BooleanSetting;
11 template <typename T> class EnumSetting;
12 
14 {
15 public:
18 
19  explicit KeyboardSettings(CommandController& commandController);
21 
22  Keys::KeyCode getDeadkeyHostKey(unsigned n) const;
24  return *codeKanaHostKey;
25  }
27  return *kpEnterMode;
28  }
30  return *mappingMode;
31  }
33  return *alwaysEnableKeypad;
34  }
36  return *traceKeyPresses;
37  }
39  return *autoToggleCodeKanaLock;
40  }
41 
42 private:
43  std::unique_ptr<EnumSetting<Keys::KeyCode>> deadkeyHostKey[3];
44  std::unique_ptr<EnumSetting<Keys::KeyCode>> codeKanaHostKey;
45  std::unique_ptr<EnumSetting<KpEnterMode>> kpEnterMode;
46  std::unique_ptr<EnumSetting<MappingMode>> mappingMode;
47  std::unique_ptr<BooleanSetting> alwaysEnableKeypad;
48  std::unique_ptr<BooleanSetting> traceKeyPresses;
49  std::unique_ptr<BooleanSetting> autoToggleCodeKanaLock;
50 };
51 
52 } // namespace openmsx
53 
54 #endif
KeyboardSettings(CommandController &commandController)
EnumSetting< MappingMode > & getMappingMode() const
BooleanSetting & getTraceKeyPresses() const
KeyCode
Constants that identify keys and key modifiers.
Definition: Keys.hh:26
Keys::KeyCode getDeadkeyHostKey(unsigned n) const
BooleanSetting & getAutoToggleCodeKanaLock() const
EnumSetting< KpEnterMode > & getKpEnterMode() const
BooleanSetting & getAlwaysEnableKeypad() const
EnumSetting< Keys::KeyCode > & getCodeKanaHostKey() const