diff --git a/input/input.lua b/input/input.lua index aef5a98..38ab8f3 100644 --- a/input/input.lua +++ b/input/input.lua @@ -306,9 +306,9 @@ input_mt = { -- -- The deadzone for analog inputs (e.g. joystick axes): if the input absolute value is strictly below this, it will be considered as 0. 0.05 by default. -- -- This is applied automatically after the evaluation of input expressions. -- deadzone = 0.05, - -- -- The pressed threshold: an input is considered down if above or equal to this value. 0.05 by default. - -- -- This is considered when determining if the input is pressed, odwn and released. - -- threshold = 0.05, + -- -- The pressed threshold: an input is considered down if above or equal to this value. 0.1 by default. + -- -- This is considered when determining if the input is pressed, down and released. + -- threshold = 0.1, -- -- Dimension of the input (i.e. the number of values returned by this input). 1 by default. -- dimension = 1 -- } @@ -371,7 +371,7 @@ input_mt = { -- Cache computed directly from the input config. Recomputed by :reload(). _dimension = 1, -- Dimension of the input. _deadzone = 0.05, -- Deadzone of the input. - _threshold = 0.05, -- Threshold of the input. + _threshold = 0.1, -- Threshold of the input. --- Update the input and its children. -- Should be called every frame, typically _after_ you've done all your input handling @@ -425,7 +425,7 @@ input_mt = { -- get main options self._dimension = self.config.dimension or 1 self._deadzone = self.config.deadzone or 0.05 - self._threshold = self.config.threshold or 0.05 + self._threshold = self.config.threshold or 0.1 -- resize dimensions if #self._value > self._dimension then for i=self._dimension+1, #self._value do @@ -602,8 +602,10 @@ input_mt = { new = filter(self, new, ...) if not new then return end -- filtered out end - s.parentCache[s.lastKey] = new - self._afterFilterEvent:emit(sname, new) + if s.parentCache[s.lastKey] ~= new then -- filter out no-op events + s.parentCache[s.lastKey] = new + self._afterFilterEvent:emit(sname, new) + end end) end self._boundSourceEvents[sname] = true