forked from 0zd3m1r/koreader-xray-plugin
-
Notifications
You must be signed in to change notification settings - Fork 8
Advanced Usage
Jimmy Pautz edited this page Apr 20, 2026
·
15 revisions
If you want to dig a bit deeper into what the plugin can do, here are a few extra features.
You can tie the X-Ray menu to any of KOReader's gestures (like corner taps or edge swipes):
- Go to Menu → Settings → Taps and Gestures → Gesture Manager.
- Pick whatever gesture you prefer.
- Look for X-Ray Quick Menu or X-Ray Characters in the action list and assign it.
While most settings are handled through the UI, you can manually enter your API keys by editing xray_config.lua in the plugin folder. It should look like this:
-- X-Ray API Configuration
return {
-- Google Gemini API Key
-- To get an API key: https://makersuite.google.com/app/apikey
-- Enter your API key here:
gemini_api_key = "AIzaSy...",
-- ChatGPT API Key
-- To get an API key: https://platform.openai.com/api-keys
-- Enter your API key here:
chatgpt_api_key = "sk-...",
}Note: Other settings like model selection and spoiler preferences are managed through the on-screen menu and stored in a separate settings.json file.
Under the Maintenance menu, you'll find a few useful utilities:
- Clear Cache: Sometimes the AI gets confused or returns weird data. Hit this to wipe the saved file for your current book and start fresh.
-
Troubleshooting: If things aren't working right, take a look at the
xray.logfile in the plugin folder. It usually points directly to whatever is going wrong.