mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
add user defined event map
This should fix #1016. Usage for #1016: Create a file named "custom.event.map.lua" in the koreader directory with the following content: return { [102] = "LPgFwd", }
This commit is contained in:
@@ -126,6 +126,15 @@ function Input:init()
|
||||
self.event_map[10001] = "OutOfSS" -- go out of screen saver
|
||||
self.event_map[10020] = "Charging"
|
||||
self.event_map[10021] = "NotCharging"
|
||||
|
||||
-- user custom event map
|
||||
local ok, custom_event_map = pcall(dofile, "custom.event.map.lua")
|
||||
if ok then
|
||||
DEBUG("custom event map", custom_event_map)
|
||||
for key, value in pairs(custom_event_map) do
|
||||
self.event_map[key] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
|
||||
Reference in New Issue
Block a user