11 #include "IConfigurationWindow.h" 12 #include "games/controllers/input/PhysicalFeature.h" 13 #include "input/joysticks/DriverPrimitive.h" 14 #include "input/joysticks/interfaces/IButtonMapper.h" 15 #include "input/keyboard/XBMC_keysym.h" 16 #include "input/keyboard/interfaces/IKeyboardDriverHandler.h" 17 #include "threads/CriticalSection.h" 18 #include "threads/Event.h" 19 #include "threads/Thread.h" 20 #include "utils/Observer.h" 32 class IKeyboardActionMap;
53 void Run(
const std::string& strControllerId,
54 const std::vector<IFeatureButton*>& buttons)
override;
56 bool Abort(
bool bWait =
true)
override;
58 void UnregisterKeys()
override;
61 std::string
ControllerID()
const override {
return m_strControllerId; }
71 bool OnKeyPress(
const CKey& key)
override;
75 void Notify(
const Observable& obs,
const ObservableMessage msg)
override;
79 void Process()
override;
82 void InitializeState(
void);
84 bool IsMapping()
const;
85 bool IsMapping(
const std::string& location)
const;
87 void InstallHooks(
void);
88 void RemoveHooks(
void);
93 bool OnAction(
unsigned int actionId);
96 std::string m_strControllerId;
97 std::vector<IFeatureButton*> m_buttons;
101 INPUT::CARDINAL_DIRECTION m_cardinalDirection;
102 JOYSTICK::WHEEL_DIRECTION m_wheelDirection;
103 JOYSTICK::THROTTLE_DIRECTION m_throttleDirection;
104 std::set<JOYSTICK::CDriverPrimitive> m_history;
105 bool m_lateAxisDetected;
106 std::string m_location;
107 bool m_bIsKeyboard =
false;
108 CCriticalSection m_stateMutex;
113 CCriticalSection m_motionMutex;
114 std::set<const JOYSTICK::IButtonMap*> m_bInMotion;
117 std::unique_ptr<KEYMAP::IKeyboardActionMap> m_actionMap;
118 std::map<std::string, CPhysicalFeature> m_keyMap;
This is an Event class built from a ConditionVariable.
Definition: Event.h:35
A wizard to direct user input.
Definition: IConfigurationWindow.h:240
Definition: GUIConfigurationWizard.h:41
bool NeedsCooldown() const override
Return true if the button mapper wants a cooldown between button mapping commands.
Definition: GUIConfigurationWizard.h:62
Definition: AudioDecoder.h:18
Definition: Observer.h:31
Basic driver element associated with input events.
Definition: DriverPrimitive.h:70
std::string ControllerID() const override
The add-on ID of the game controller associated with this button mapper.
Definition: GUIConfigurationWizard.h:61
Interface for handling keyboard events.
Definition: IKeyboardDriverHandler.h:22
Definition: PhysicalFeature.h:30
Definition: Observer.h:44
bool AcceptsPrimitive(JOYSTICK::PRIMITIVE_TYPE type) const override
Return true if the button mapper accepts primitives of the given type.
Definition: GUIConfigurationWizard.h:63
Interface for mapping buttons to Kodi actions.
Definition: IKeymap.h:28
void OnKeyRelease(const CKey &key) override
A key has been released.
Definition: GUIConfigurationWizard.h:72