MCPcopy Index your code
hub / github.com/Mino260806/KeyboardGPT

github.com/Mino260806/KeyboardGPT @v2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0 ↗ · + Follow
420 symbols 1,036 edges 77 files 2 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Keyboard GPT

Last updated on 12/08/2025

An LSPosed Module that lets you integrate Generative AI like ChatGPT in your favorite keyboard.

  • [x] Tested up to Android 15, may work in later versions.
  • [x] Works with Rooted and Unrooted devices.
  • [x] Works in all apps.
  • [x] Works with all keyboards.

Demo Video : Normal Prompt

https://github.com/user-attachments/assets/bc054498-7aa6-4834-bf54-41d5e2b785b6

Demo Video : Custom Prompts

https://github.com/user-attachments/assets/ae3a4aff-3744-4b16-a3eb-18da2b5c1f3c

Demo Video : Text Formatting

https://github.com/user-attachments/assets/27043163-9920-48e3-bb02-0f68803d0be7

Demo Video : Custom Patterns

https://github.com/user-attachments/assets/80e9abab-7a4b-404e-9777-2d22436ce5e2

Demo Video : Web Search

https://github.com/user-attachments/assets/4cbf9088-0fb2-45d1-9a89-c0c72c1aff6e

Icon

Tested Keyboards

To this date, all tested keyboards are fully compatible with KeyboardGPT - Google Gboard - Microsoft Swiftkey - Yandex Keyboard - Simple Keyboard - Futo Keyboard

PS: If a keyboard is not in this list, it means that it has not been tested yet. However, even if your keyboard is not there, there is a very high chance that it's also supported by KeyboardGPT, as I haven't found an unsupported keyboard among those I have tested.

Features

  • AI chat completions (supports normal and custom prompts)
  • Text Formatting (bold, italic, ...)
  • Web Search

Install Guide

Root

  1. Install module apk from releases
  2. Enable module in LSPosed and select your favorite keyboard
  3. Force close the keyboard from settings, or if you don't know how, restart you phone

No Root

  1. Install module apk from releases
  2. Patch your favorite keyboard apk in LSPatch Manager and follow the instructions

Video : Using LSPatch (No Root)

https://github.com/user-attachments/assets/ebacb5e4-08fb-45ff-8dcd-4d9b8f9232a0

Note: With No Root method, you cannot patch a system app (Mostly Gboard or Samsung Keyboard, depending on your system).

Usage Guide

  • *#settings#* open module settings
  • $<prompt>$ submit a normal prompt
  • $$ configure API provider (API key, model, ...)
  • %<prefix> <prompt>% submit a custom prompt
  • %% configure custom promtps
  • %s <text>% do a web search
  • |<text>| transform your text into italic form
  • @<text>@ transform your text into bold form
  • ~<text>~ transform your text into ~~crossout~~ form
  • _<text>_ transform your text into underline form

See Demo Videos above

Bonus Tip: Providers that offer free API access (as of August 2025) + Google (Gemini). Grab a key + Groq. Grab a key + OpenRouter. Grab a key

Supported Generative AI APIs

  • Gemini
  • ChatGPT
  • Groq
  • OpenRouter
  • Claude

More suggestions are welcome !

Links

XDA Link

Telegram Discussion

Extension points exported contracts — how you extend this code

ConfigChangeListener (Interface)
(no doc) [8 implementers]
app/src/main/java/tn/amin/keyboard_gpt/listener/ConfigChangeListener.java
InternetProvider (Interface)
(no doc) [5 implementers]
app/src/main/java/tn/amin/keyboard_gpt/llm/internet/InternetProvider.java
ParseResultFactory (Interface)
(no doc) [4 implementers]
app/src/main/java/tn/amin/keyboard_gpt/text/parse/result/ParseResultFactory.java
InternetRequestListener (Interface)
(no doc) [2 implementers]
app/src/main/java/tn/amin/keyboard_gpt/llm/service/InternetRequestListener.java
ConfigInfoProvider (Interface)
(no doc) [2 implementers]
app/src/main/java/tn/amin/keyboard_gpt/listener/ConfigInfoProvider.java

Core symbols most depended-on inside this repo

log
called by 47
app/src/main/java/tn/amin/keyboard_gpt/MainHook.java
getConfig
called by 34
app/src/main/java/tn/amin/keyboard_gpt/external/dialog/box/DialogBox.java
getInstance
called by 26
app/src/main/java/tn/amin/keyboard_gpt/ui/UiInteractor.java
getContext
called by 19
app/src/main/java/tn/amin/keyboard_gpt/external/dialog/box/DialogBox.java
get
called by 17
app/src/main/java/tn/amin/keyboard_gpt/instruction/command/CommandManager.java
getInstance
called by 17
app/src/main/java/tn/amin/keyboard_gpt/ui/IMSController.java
toString
called by 13
app/src/main/java/tn/amin/keyboard_gpt/llm/client/LanguageModelClient.java
switchToDialog
called by 13
app/src/main/java/tn/amin/keyboard_gpt/external/dialog/box/DialogBox.java

Shape

Method 337
Class 65
Interface 10
Enum 8

Languages

Java99%
Kotlin1%

Modules by API surface

app/src/main/java/tn/amin/keyboard_gpt/SPManager.java32 symbols
app/src/main/java/tn/amin/keyboard_gpt/ui/UiInteractor.java23 symbols
app/src/main/java/tn/amin/keyboard_gpt/llm/GenerativeAIController.java19 symbols
app/src/main/java/tn/amin/keyboard_gpt/ui/IMSController.java17 symbols
app/src/main/java/tn/amin/keyboard_gpt/external/dialog/box/OtherSettingsDialogBox.java17 symbols
app/src/main/java/tn/amin/keyboard_gpt/llm/client/LanguageModelClient.java15 symbols
app/src/main/java/tn/amin/keyboard_gpt/external/dialog/box/DialogBox.java14 symbols
app/src/main/java/tn/amin/keyboard_gpt/MainHook.java11 symbols
app/src/main/java/tn/amin/keyboard_gpt/KeyboardGPTBrain.java11 symbols
app/src/main/java/tn/amin/keyboard_gpt/text/parse/ParsePattern.java10 symbols
app/src/main/java/tn/amin/keyboard_gpt/llm/service/ExternalInternetProvider.java10 symbols
app/src/main/java/tn/amin/keyboard_gpt/llm/publisher/InternetRequestPublisher.java10 symbols

For agents

$ claude mcp add KeyboardGPT \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page