Skip to content

Advanced Usage

Jimmy Pautz edited this page Apr 20, 2026 · 15 revisions

Advanced Usage

If you want to dig a bit deeper into what the plugin can do, here are a few extra features.

Quick Lookups

You don't have to navigate through the main menu every time you want to check a character's name.

  • Selection Popup: If you long-press a word or name while reading, you'll see an X-Ray button in the dictionary popup. Tap that to instantly search your database for that specific text.
  • Highlights: If you long-press an existing highlight, the standard KOReader menu will pop up. There's an X-Ray option added in there too.
  • Keyboard Shortcut: If you happen to be using a device with a keyboard, pressing Alt + X will open the quick menu.

[Screenshot Placeholder: X-Ray button in Dictionary/Selection Popup]

Gestures

You can tie the X-Ray menu to any of KOReader's gestures (like corner taps or edge swipes):

  1. Go to Menu → Settings → Taps and Gestures → Gesture Manager.
  2. Pick whatever gesture you prefer.
  3. Look for X-Ray Quick Menu or X-Ray Characters in the action list and assign it.

Manual Config Editing

If you'd rather not deal with the UI for settings, you can edit the config file directly. Just open xray_config.lua in the plugin folder. It looks something like this:

return {
    gemini_api_key = "AIzaSy...",
    chatgpt_api_key = "sk-...",
    
    default_provider = "gemini",
    gemini_primary_model = "gemini-2.5-flash",
    gemini_secondary_model = "gemini-2.5-flash-lite",
    chatgpt_model = "gpt-4o-mini",
}

Maintenance Tools

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.
  • Check for Updates: A quick way to pull the latest version of the plugin without having to manually download the zip file from GitHub.
  • Troubleshooting: If things aren't working right, take a look at the xray.log file in the plugin folder. It usually points directly to whatever is going wrong.

Clone this wiki locally