XtMapper
2.6.1 · GitHub
More about this app
Keymapper for Android x86
XtMapper
XtMapper, a free and open source keymapper.
Play your Android games with keyboard and mouse
About and features
https://xtr126.github.io/XtMapper-docs/guides/about
Watch video on YouTube
Screenshots
Click to expand
| | | |
| ------------- | ------------- | ------------- |
|
| |
|
|
|
|
|
Development
See the development guide for build setup and Android instrumentation. See CONTRIBUTING.md to report issues, ask questions, or contribute.
Help and support
To report any bugs to help improve XtMapper please create an issue at https://github.com/Xtr126/XtMapper/issues
To share your thoughts on XtMapper or ask any questions please create a post at https://github.com/Xtr126/XtMapper/discussions
Using on waydroid
https://xtr126.github.io/XtMapper-docs/waydroid/1-overview/
Credits
| @Xtr126 | Project creator and primary maintainer; core input mapping, editor, and service implementation |
| @SoufianoDev | Secondary maintainer; Kotlin migration, codebase improvements, bug fixes, and translation updates |
See CONTRIBUTORS.md for the full contributor and translator list.
See CREDITS.md for third-party code, libraries, assets, and copyright.
How Shizuku is used
Can map keyboard and mouse to touch in games via Shizuku service using `InputManager.injectInputEvent`, `getTasks` and `am start`.
This is an AI-assisted analysis of Shizuku-related usages in the app's public source code. It is best effort, so it may not catch every single usage.
How this app uses Shizuku
XtMapper uses Shizuku to run its keymapping server with elevated privilege so physical keyboard and mouse can drive touch games.
- Map keys to touch: keyboard input from raw device events is translated by the active keymap profile into taps, holds and multi-touch gestures injected as touchscreen events through the system input manager.
- Move mouse and click: relative mouse motion, left, right and middle clicks and wheel movement become cursor movement and injected mouse and scroll events, with a custom cursor shown over games.
- Show cursor overlay: the cursor window is created as a secure system overlay on the selected display so it stays visible above games while mapping is active, including granting overlay access with an
appops setshell command through Shizuku. - Auto switch profiles: the service polls the current foreground tasks to learn the top app package and automatically starts the matching keymap profile for that game.
- Launch games for mapping: when a profile starts, the service launches the mapped game package with the
am startshell command.
Android APIs or commands used
android.hardware.input.InputManager.injectInputEventandroid.hardware.input.InputManagerGlobal.injectInputEventandroid.view.MotionEvent.obtainandroid.view.MotionEvent.setDisplayIdandroid.view.MotionEvent.setActionButtonandroid.app.IActivityManager.getTasksandroid.os.ServiceManager.getServiceandroid.view.WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAYandroid.view.WindowManager.setDefaultTokenandroid.content.Context.createDisplayContextandroid.content.Context.createWindowContextappops set ... SYSTEM_ALERT_WINDOW allowam start
Changelog
What's new for version 2.6.1
- Replace system getevent with a Kotlin evdev monitor by @Xtr126 in https://github.com/Xtr126/XtMapper/pull/240
- QoL improvements: Default profile visibility fix and service controls, shell startup, move logs button by @Xtr126 in https://github.com/Xtr126/XtMapper/pull/251
- Keep cursor fallback and streamline privileged activation by @Xtr126 in https://github.com/Xtr126/XtMapper/pull/252 - Fixes server pointer crash, auto grant overlay permission, remove process exit workaround for Shizuku
- Fix input-service races and add persistent logs by @SoufianoDev in https://github.com/Xtr126/XtMapper/pull/238 - Adds XtLogger by @SoufianoDev
- fix: resolve untrusted touch drops on Android 12+ and overlay lifecycle leaks by @MagneticMonopoleX in https://github.com/Xtr126/XtMapper/pull/244
- Generate native and Kotlin input codes and AOSP-style labels by @Xtr126 in https://github.com/Xtr126/XtMapper/pull/239
- Show disabled profile notice in alert dialog by @Xtr126 in https://github.com/Xtr126/XtMapper/pull/235
Other changes
- Maintain and modernize the Android build system by @Xtr126 in https://github.com/Xtr126/XtMapper/pull/242
- build(deps): bump org.jetbrains.kotlin.plugin.compose from 2.4.0 to 2.4.21 by @dependabot[bot] in https://github.com/Xtr126/XtMapper/pull/245
- Apply code cleanup and remove stale window manager stubs by @Xtr126 in https://github.com/Xtr126/XtMapper/pull/249
- Simplify contributor guidance and prepare Android instrumentation by @Xtr126 in https://github.com/Xtr126/XtMapper/pull/250
Full Changelog: https://github.com/Xtr126/XtMapper/compare/v2.6.0...v2.6.1
Permissions
12 permissions requested
