View Single Post
Old 10-08-2024, 10:11 AM   #11
lumping-sugar66
Zealot
lumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trollslumping-sugar66 doesn't feed trolls
 
lumping-sugar66's Avatar
 
Posts: 100
Karma: 81981
Join Date: Oct 2023
Location: Ontario, Canada
Device: Kobo Aura Edition 2, Kobo Clara 2E
Quote:
Originally Posted by hius07 View Post
Uploading may take time, and we cannot pause the system responding to the hard button pressing.
Please note that the sleep button is handled by the system itself.

You sort of can. At least on a kobo I know that the sleep button does nothing more than triggering an event.

Example on a Kobo device, it's under:
koreader/frontend/device/kobo/device.lua

Lines 700 to 710 in a3d42ac
Code:
 event_map = { 
     [35] = "SleepCover",  -- KEY_H, Elipsa 
     [59] = "SleepCover", 
     [90] = "LightButton", 
     [102] = "Home", 
     [116] = "Power", 
     [193] = "RPgBack", 
     [194] = "RPgFwd", 
     [331] = "Eraser", 
     [332] = "Highlighter",
I forgot which one is which but you can comment the power event out, and the power button won't work (I did it many times). You can map it to something else, and it'll trigger that event.
lumping-sugar66 is offline   Reply With Quote