diff --git a/frontend/ui/gesturedetector.lua b/frontend/ui/gesturedetector.lua index 449e191c5..9d1fc01bb 100644 --- a/frontend/ui/gesturedetector.lua +++ b/frontend/ui/gesturedetector.lua @@ -183,7 +183,7 @@ function GestureDetector:tapState(ev) local deadline = self.cur_ev.timev + TimeVal:new{ sec = 0, usec = self.DOUBLE_TAP_INTERVAL, } - Input:setTimeOut(function() + Input:setTimeout(function() DEBUG("in tap timer", self.last_tap ~= nil) -- double tap will set last_tap to nil so if it is not, then -- user must only tapped once @@ -206,7 +206,7 @@ function GestureDetector:tapState(ev) local deadline = self.cur_ev.timev + TimeVal:new{ sec = 0, usec = self.HOLD_INTERVAL } - Input:setTimeOut(function() + Input:setTimeout(function() print("hold timer", self.state == self.tapState) if self.state == self.tapState then -- timer set in tapState, so we switch to hold diff --git a/frontend/ui/inputevent.lua b/frontend/ui/inputevent.lua index 81a326513..89a496f29 100644 --- a/frontend/ui/inputevent.lua +++ b/frontend/ui/inputevent.lua @@ -268,7 +268,7 @@ function Input:adjustKindle4EventMap() self.event_map[104] = "LPgFwd" end -function Input:setTimeOut(cb, tv_out) +function Input:setTimeout(cb, tv_out) local item = { callback = cb, deadline = tv_out, @@ -304,7 +304,7 @@ function Input:waitEvent(timeout_us, timeout_s) local ges = self.timer_callbacks[1].callback() table.remove(self.timer_callbacks, 1) if ges then - -- Do we really need to clear all setTimeOut after + -- Do we really need to clear all setTimeout after -- decided a gesture? FIXME Input.timer_callbacks = {} return Event:new("Gesture", ges)