12 #include "input/joysticks/interfaces/IButtonSequence.h" 13 #include "input/joysticks/interfaces/IInputHandler.h" 14 #include "input/joysticks/interfaces/IKeymapHandler.h" 41 bool HotkeysPressed(
const std::set<std::string>& keyNames)
const override;
43 void OnPress(
const std::string& keyName)
override { m_lastPressed = keyName; }
53 unsigned int motionTimeMs)
override;
57 unsigned int motionTimeMs)
override;
61 unsigned int motionTimeMs)
override;
64 unsigned int motionTimeMs)
override;
69 std::unique_ptr<IButtonSequence> m_easterEgg;
75 ANALOG_STICK_DIRECTION dir,
76 unsigned int motionTimeMs);
77 void DeactivateDirection(
const FeatureName& feature, ANALOG_STICK_DIRECTION dir);
83 unsigned int motionTimeMs);
90 unsigned int motionTimeMs);
94 IKeyHandler* GetKeyHandler(
const std::string& keyName);
95 bool HasAction(
const std::string& keyName)
const;
102 std::map<std::string, std::unique_ptr<IKeyHandler>> m_keyHandlers;
105 std::string m_lastPressed;
bool OnAnalogStickMotion(const FeatureName &feature, float x, float y, unsigned int motionTimeMs) override
An analog stick has moved.
Definition: KeymapHandler.cpp:107
bool OnAccelerometerMotion(const FeatureName &feature, float x, float y, float z) override
An accelerometer's state has changed.
Definition: KeymapHandler.cpp:188
THROTTLE_DIRECTION
Directions on a throttle.
Definition: JoystickTypes.h:130
bool AcceptsInput(const FeatureName &feature) const override
Return true if the input handler is currently accepting input for the given feature.
Definition: KeymapHandler.cpp:61
void OnButtonHold(const FeatureName &feature, unsigned int holdTimeMs) override
A digital button has been pressed for more than one event frame.
Definition: KeymapHandler.cpp:86
bool OnThrottleMotion(const FeatureName &feature, float position, unsigned int motionTimeMs) override
A throttle has changed state.
Definition: KeymapHandler.cpp:162
Interface for handling keymap keys.
Definition: IKeyHandler.h:22
bool HasFeature(const FeatureName &feature) const override
Return true if the input handler accepts the given feature.
Definition: KeymapHandler.h:47
std::string GetLastPressed() const override
Get the key name of the last button pressed.
Definition: KeymapHandler.h:42
Interface for mapping buttons to Kodi actions.
Definition: IKeymap.h:22
bool HotkeysPressed(const std::set< std::string > &keyNames) const override
Get the pressed state of the given keys.
Definition: KeymapHandler.cpp:39
std::string ControllerID() const override
The add-on ID of the game controller associated with this input handler.
Definition: KeymapHandler.cpp:56
void OnPress(const std::string &keyName) override
Called when a key has emitted an action after bring pressed.
Definition: KeymapHandler.h:43
Interface for a class working with a keymap.
Definition: IKeymapHandler.h:22
WHEEL_DIRECTION
Directions on a wheel.
Definition: JoystickTypes.h:120
void OnInputFrame() override
Called at the end of the frame that provided input.
Definition: KeymapHandler.h:65
Controller configuration window.
Definition: AudioDecoder.h:18
bool OnWheelMotion(const FeatureName &feature, float position, unsigned int motionTimeMs) override
A wheel has changed state.
Definition: KeymapHandler.cpp:136
Definition: IActionListener.h:13
bool OnButtonPress(const FeatureName &feature, bool bPressed) override
A digital button has been pressed or released.
Definition: KeymapHandler.cpp:75
std::string FeatureName
Name of a physical feature belonging to the joystick.
Definition: JoystickTypes.h:28
Definition: KeymapHandler.h:33
bool OnButtonMotion(const FeatureName &feature, float magnitude, unsigned int motionTimeMs) override
An analog button (trigger or a pressure-sensitive button) has changed state.
Definition: KeymapHandler.cpp:97