mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
A few Kobo input tweaks (#4450)
* Fix the Touch input probe on Trilogy devices that depend on the touch_probe_ev_epoch_time quirk (fix #630) * Expose a "Pageturn button inversion" feature in the Navigation menu (for all devices with keys) (fix #4446) * Allow ignoring the accelerometer on the Forma (Screen > Ignore accelerometer rotation events; also available from the Gesture Manager) (fix #4451) * Fix SleepCover handling on the Forma (fix #4457) * Make isWifiOn a tiny bit more accurate (check the actual WiFi module instead of sdio_wifi_pwr) * Move all flash related Screen options to the eInk submenu
This commit is contained in:
@@ -659,6 +659,16 @@ function Input:handleMiscEvNTX(ev)
|
||||
end
|
||||
end
|
||||
|
||||
-- Allow toggling it at runtime
|
||||
function Input:toggleMiscEvNTX()
|
||||
if self.isNTXAccelHooked then
|
||||
self.handleMiscEv = function() end
|
||||
else
|
||||
self.handleMiscEv = self.handleMiscEvNTX
|
||||
end
|
||||
|
||||
self.isNTXAccelHooked = not self.isNTXAccelHooked
|
||||
end
|
||||
|
||||
-- helpers for touch event data management:
|
||||
|
||||
@@ -705,6 +715,10 @@ function Input:isEvKeyPress(ev)
|
||||
return ev.value == EVENT_VALUE_KEY_PRESS
|
||||
end
|
||||
|
||||
function Input:isEvKeyRepeat(ev)
|
||||
return ev.value == EVENT_VALUE_KEY_REPEAT
|
||||
end
|
||||
|
||||
function Input:isEvKeyRelease(ev)
|
||||
return ev.value == EVENT_VALUE_KEY_RELEASE
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user