BetterZUIKey

Please scroll down for English / 英语请向下滚动

面向联想 ZUXOS / ZUI 平板与二合一设备的 LSPosed 键盘快捷键覆写模块。

ZUXOS 内置大量 Win/Ctrl/Alt 组合键与物理快捷键,但许多无法真正禁用,关闭系统开关后按键仍会被系统吞掉。BetterZUIKey 在系统键盘处理链中插入拦截点,让你对每条快捷键独立选择行为,并支持按前台应用切换配置。

当前版本:1.3.0-beta2
包名moe.lovefirefly.betterzuikey


适用环境

项目 要求
系统 联想 ZUXOS(已在 Android 16 / ZUXOS 1.5.04 测试)
Root 可选挂载。当没有挂载 Root 时使用 system_server 权限代理执行命令,会稍有延迟
框架 LSPosed(libxposed API);自 v1.1.0-beta1 后已经不支持 XPosed
作用域 系统框架system_server,必须);输入法 hook 策略需额外勾选目标 IME

低版本 Android 15 未经测试,欢迎在 Issues 反馈。


主要功能

⌨️ 快捷键(全局)

  • 50+ 条 Win/Ctrl/Alt/Shift 组合键与 AOSP 辅助功能键(Win+Alt+3~6 等)
  • 每条支持最多 五种覆写模式:保持默认 / 启用 ZUX / 启用 AOSP / 关闭(透传给应用)/ 忽略
  • 支持搜索、筛选;修改覆写时自动打开对应系统开关以完全接管事件

特别地:

Win 长按

模式 说明
保持默认 透传,由系统决定(含语音助手等,需要特殊的键盘方有效)
启用 ZUX 实现 模块接管:短按 Win → 开始菜单,长按 → 语音助手(国行=小天)
忽略 无动作
执行命令… 长按运行脚本;长按卡片打开命令编辑器

智能键 507和508

模式 短按 长按
跟随系统 系统决定 系统决定
忽略 无动作 无动作
执行命令… 运行脚本 打开系统智能键设置页

长按卡片可跳转系统「键盘应用功能」设置页。

v1.3.0 起,附录中的多数 ZUI 物理键(静音、触控板、分屏、Print Screen 等)不再提供模块覆写,交由 ZUI / 系统原生处理;507和508 仍可在本 Tab 配置。

📋 应用模板

  • 为指定前台 App 单独定义快捷键覆写,覆盖全局「快捷键」Tab 的对应项
  • 未在模板中列出的键继续继承全局设置
  • 支持多 App 绑定、复制、排序;同一 App 匹配多个模板时,列表中第一个启用的生效

⚙️ 设置

输入法增强(独立子页)

  • 「切换输入法」「切换语言」各绑定一个物理组合键(Ctrl+Shift、Alt+Shift、Ctrl+Space、右 Alt、Win 长按等)
  • JSON IME Profile 预设(framework / hook / keyremap 三种策略)
  • 当 Win 长按被多重占用时,根据是否在输入状态决定 IME 切换 / Win 长按卡片的功能

虚拟 Fn 键

  • Win 模拟 Fn → F1~F12;FnLock(Win+`)与临时 Fn 模式
  • 键盘 Profile 导入/导出;配合键盘检测页录制 scanCode 映射

Termux 集成

  • 一键授予 RUN_COMMAND 等权限,供「执行命令…」运行 shell 脚本
  • 脚本模板支持 root / 超时 / 单例运行

其它:模块总开关、外观、日志级别、应用内中英文与完整帮助文档


安装

  1. Releases 下载最新 APK 并安装
  2. 打开 LSPosed Manager → 模块 → 启用 BetterZUIKey
  3. 作用域勾选 系统框架(必须);若使用输入法 hook 策略,按需勾选目标 IME
  4. 软重启 system_server(或重启设备)
  5. 打开应用,主页状态为 已激活 即成功

详细说明与快捷键参考见应用内 帮助 页面。


开源与反馈


免责声明

本模块直接 Hook 系统键盘输入处理链。使用前请阅读应用内帮助并理解各选项含义。不当配置可能导致部分快捷键行为异常;开发者不承担因使用本模块造成的系统故障、数据丢失或设备异常的责任。

部分代码由 AI 辅助生成,如有问题欢迎提交 Issue 或 Pull Request。


BetterZUIKey (English)

An LSPosed module for overriding keyboard shortcuts on Lenovo ZUXOS / ZUI tablets and convertibles.

ZUXOS ships with many Win/Ctrl/Alt combos and physical shortcut keys, but many cannot be truly disabled — the system may still swallow key events even when toggles are off. BetterZUIKey hooks the keyboard shortcut pipeline so you can choose behavior per shortcut and apply per-app templates.

Version: 1.3.0-beta2
Package: moe.lovefirefly.betterzuikey


Requirements

Item Requirement
OS Lenovo ZUXOS (tested on Android 16 / ZUXOS 1.5.04)
Root Optional. Without root, custom commands run via a system_server privilege proxy and may feel slightly delayed
Framework LSPosed (libxposed API). Not compatible with legacy Xposed since v1.1.0-beta1
Scope System Framework (system_server, required). IME hook profiles also need the target IME scoped

Android 15 and below are untested. Feedback welcome via Issues.


Features

⌨️ Shortcuts (global)

  • 50+ Win/Ctrl/Alt/Shift combos and AOSP accessibility keys (Win+Alt+3~6, etc.)
  • Up to five override modes per shortcut: Keep default / Use ZUX / Use AOSP / Off (pass through to app) / Block
  • Search and filter; changing an override auto-enables the matching system toggle so the module fully owns the event

In particular:

Win long-press

Mode Description
Keep default Pass-through; system decides (voice assistant, etc.; needs specific keyboard firmware)
Use ZUX Module takes over: short Win → Start Menu, long Win → voice assistant (PRC = XiaoTian)
Block No action
Run command… Long press runs script; long-press card opens command editor

Smart keys 507 and 508

Mode Short press Long press
Follow system System decides System decides
Block No action No action
Run command… Run script Open system smart-key settings

Long-press the card to jump to the system Keyboard App Functions page.

Since v1.3.0, most ZUI physical keys in the appendix (mute, touchpad, split-screen, Print Screen, etc.) are no longer overridable by the module and are handled by ZUI / the system natively. 507 and 508 remain configurable on this tab.

📋 App templates

  • Define per-app shortcut overrides for a foreground app, superseding the matching entries on the global Shortcuts tab
  • Keys not listed in a template keep inheriting global settings
  • Multi-app binding, copy, and reorder supported; if one app matches several templates, the first enabled one in the list wins

⚙️ Settings

IME Enhancement (separate page)

  • Bind a physical combo each for “Switch IME” and “Switch language” (Ctrl+Shift, Alt+Shift, Ctrl+Space, Right Alt, Win long-press, etc.)
  • JSON IME Profile presets (framework / hook / keyremap strategies)
  • When Win long-press has multiple roles, input-state decides whether IME switching or the Win long-press card behavior applies

Virtual Fn key

  • Win simulates Fn → F1–F12; FnLock (Win+`) and temporary Fn mode
  • Keyboard profile import/export; use the keyboard detect page to record scanCode mappings

Termux integration

  • One-tap grant of RUN_COMMAND and related permissions for Run command… shell scripts
  • Script templates support root / timeout / singleton run

Other: master switch, appearance, log level, in-app EN/ZH and full help docs


Install

  1. Download the latest APK from Releases and install
  2. LSPosed Manager → Modules → enable BetterZUIKey
  3. Scope System Framework (required); if using IME hook profiles, scope the target IME(s) as needed
  4. Soft-reboot system_server (or reboot the device)
  5. Open the app — home status should show active

See in-app Help for details and the full shortcut reference.


Source & feedback


Disclaimer

This module hooks the system keyboard input pipeline directly. Read in-app help and understand each option before changing settings. Misconfiguration may cause unexpected shortcut behavior; the developer is not liable for system failures, data loss, or device issues caused by use of this module.

Portions of the code were AI-assisted. Issues and pull requests are welcome.

Releases

7/12/2026, 8:41:18 AM

BetterZUIKey v1.5.0-beta1

Please scroll down for English / 英语请向下滚动

摘要

本次更新修复了更多遗留的问题。

完整变更: CommandPrompt-Wang/BetterZUIKey@14-v1.4.1-beta3...15-v1.5.0-beta1

Bug 修复

  • 修复 Fn 映射失效:修复了一个导致 App1/2 (智能键)映射失效的反射问题。
  • 命令执行重构:集成 TermuxAm 作为子模块。现在非 root 模式下,脚本的 am 将被 termuxam 替代。
    • 这解决了非 root 模式下 am 因权限不足(134 SIGABRT)执行失败的问题。

其他

  • 警告抑制:消除了部分编译器警告,包括不得不使用的过时 API。
  • 日志级别调整MetaTracePassthroughTrace 的追踪日志从 INFO 降为 DEBUG。

BetterZUIKey v1.5.0-beta1

Highlights

This update fixes more legacy issues.

Full Changelog: CommandPrompt-Wang/BetterZUIKey@14-v1.4.1-beta3...15-v1.5.0-beta1

Bug Fixes

  • Fixed broken Fn key mapping: Fixed a reflection issue that caused App1/2 (smart key) mapping to fail.
  • Command Executor Overhaul: Integrated TermuxAm as a Git submodule. In non-root mode, script am is now replaced by termuxam.
    • This fixes "am" exit code 134 (SIGABRT) due to insufficient permissions in non-root mode.

Other

  • Warnings suppressed: Eliminated some compiler warnings, including unavoidable deprecated API usage.
  • Log level adjustments: Downgraded MetaTrace/PassthroughTrace logs from INFO to DEBUG.

Assets

1

7/11/2026, 1:18:50 PM

BetterZUIKey v1.4.1-beta3

[Please scroll down for English / 英语请向下滚动](#eng)

Full Changelog: CommandPrompt-Wang/BetterZUIKey@13-v1.4.1-beta2...14-v1.4.1-beta3

功能更新

  • 更新下载:实装了更新下载功能,现在检查到更新版本会弹窗提示下载安装
    • 安装新版本后请及时重启

Bug 修复

  • 修复 Fn 映射失效的问题:v1.1.0-beta1 删除的代码导致了后续版本的 Fn 映射均无法正常工作,现在可以正常使用映射了

其他

  • 调整了部分日志的级别:将部分 INFO 下降到 DEBUG

BetterZUIKey v1.4.1-beta3

Full Changelog: CommandPrompt-Wang/BetterZUIKey@13-v1.4.1-beta2...14-v1.4.1-beta3

New Features

  • Download Updates: Download updates are now available. On detecting a new version, a pop-up prompts for download and installation.
    • Don't forget to restart your device after installing the new version.

Bug Fixes

  • Fixed Fn key mapping not working: Code removed in v1.1.0-beta1 broke Fn mapping in all later versions. Now working again.

Other

  • Adjusted some log levels: Downgraded some INFO logs to DEBUG.

Assets

1

7/7/2026, 7:55:17 AM

BetterZUIKey v1.4.1-beta2

Please scroll down for English / 英语请向下滚动

摘要

本次更新是 v1.4.1-beta1 的修补版本。修复了快捷键映射与触发键相同时的无限循环、IME 配置文件开机不生效及偶发开机卡顿,同时重做了模块作用域检测。

要查看自上次发布以来的完整更改,请参阅:CommandPrompt-Wang/BetterZUIKey@12-v1.4.1-beta1...13-v1.4.1-beta2

🐛 修复

  • 快捷键映射与触发键相同时无限循环:修复了当语言切换快捷键和 profile 的 remap-to 目标恰好相同时(如 GBoard 预设的 Ctrl+Space → Ctrl+Space),注入的合成事件会被模块重新捕获,导致无限循环反复触发直到退出文本输入的问题。
    • 已增强注入检测,避免重复触发。
  • IME 配置文件重启后丢失:修复了重启设备后,之前配置的输入法语言切换方案无法生效,需手动打开 App 才可能恢复的问题。
    • 现开机后首次按键即可自动加载。
  • 偶发开机系统卡顿:模块在开机流程中执行了过多的系统调用,部分设备上会触发系统看门狗导致 ANR。
    • 已优化相关路径。
  • 显示修复:修复了因硬编码版本号导致的部分界面版本号显示落后的问题。

🔄 变更

  • 弃用 hook 路径:移除了输入法增强中 hook 路径。原有配置文件中 hook 相关的配置项将被忽略。
    • 由于复杂的 IPC 问题,hook 路径需要大量适配才可能工作;再加之难以找到一个通用的解决方案,我实在没有精力也没有能力在不为外挂铺路、保证系统安全的前提下实现该功能。
    • 其余两条路径仍然可用,不受到本次更新影响。

🔧 其他

  • 重做模块作用域检测:首页状态卡现在更准确、更即时——冷启动首次打开 App 即显示正确颜色,不会再出现"明明已激活却显示红色/橙色"的情况。

BetterZUIKey v1.4.1-beta2

Highlights

A v1.4.1 patch that fixes infinite looping when remap target matches the trigger key, IME profiles not persisting across reboots, an occasional boot lag, and reworks scope detection so the status card shows correctly on the very first cold-boot launch.

For a complete list of changes since the last release, see: CommandPrompt-Wang/BetterZUIKey@12-v1.4.1-beta1...13-v1.4.1-beta2

🐛 Fixes

  • Infinite loop when remap target matches trigger key: When the language-switch shortcut and the profile's remap-to target are identical (e.g., GBoard's default Ctrl+Space → Ctrl+Space), injected synthetic events were re-captured by the module, causing an infinite trigger loop that froze the system. Now fixed.
  • IME profiles lost after reboot: Previously, IME language-switching profiles would not take effect after a reboot until the App was manually opened. Now they load automatically on the first keypress after boot.
  • Occasional boot lag / ANR: The module was making excessive system calls during boot, triggering the system watchdog on some devices. Optimized.
  • Display fix: Fixed outdated version display on certain screens caused by hardcoded version strings.

🔄 Changes

  • Deprecated hook strategy: The IME enhancement hook path has been removed. Existing hook entries in profile configurations will be silently ignored. The framework and keyremap strategies remain fully functional and are unaffected by this change.

🔧 Other

  • Reworked module scope detection: The home page status card is now more accurate and responsive — it displays the correct color on the very first cold-boot launch. No more false red or orange when the module is actually active.

Assets

1

7/2/2026, 6:42:08 PM

BetterZUIKey v1.3.0-beta3

[Please scroll down for English / 英语请向下滚动](#eng)

更新

  • 脚本行尾修复:执行「执行命令…」脚本前自动去除 \r(等效 dos2unix),修复 Windows/CRLF 的脚本在设备 shell 下异常的问题;内置脚本模板已转为 LF。
  • 移除 Ctrl+Space 双投递:删除快捷键 Tab 中的 Ctrl+Space 卡片及遗留代码(输入法增强仍可用)

BetterZUIKey v1.3.0-beta3

Update

  • Script line endings: Strip \r before running custom scripts (dos2unix-style), fixing CRLF templates on device shell; bundled templates use LF.
  • Script editor: Yellow warning when CRLF is detected — will convert to LF on run.
  • Removed Ctrl+Space dual-delivery: Remove the Ctrl+Space card and legacy code in the tab for shortcut keys (input method enhancement is still available)

Assets

1

7/6/2026, 9:18:40 AM

BetterZUIKey v1.4.1-beta1

Please scroll down for English / 英语请向下滚动

Full Changelog: CommandPrompt-Wang/BetterZUIKey@11-v1.4.0-beta1...12-v1.4.1-beta1

功能更新

  • 配置文件制作器:输入法增强页新增「制作配置文件」入口,通过三步生成配置文件:选择输入法、选择策略、录制快捷键(弹窗实时捕获物理键盘组合键),填完可点击复制(记得改名字)。
  • 管理页增强:修改了 IME 配置文件的卡片布局,新增重命名功能,任意配置均可删除,删除内置配置后支持还原。
  • 导入覆盖确认:导入与现有包名相同的配置时弹窗提示,避免误覆盖。

Bug 修复

  • 修复 Ctrl+Shift 切换语言不生效的问题:配置存储机制重构,系统进程可正常读取,彻底解决物理键盘语言切换失效。
  • 修复纯修饰键组合无法注入的问题:Ctrl+Shift 等组合现在可正常发送至输入法。

提示

  • 签名修正:现在从 Release(此处)和我的网站下载的文件签名已经一致了,文件大小差异是不同 Gradle 版本的正常现象

BetterZUIKey v1.4.1-beta1

Full Changelog: CommandPrompt-Wang/BetterZUIKey@11-v1.4.0-beta1...12-v1.4.1-beta1

Features

  • Profile maker: New "Make Profile" button on the IME Enhancement page. A three-step guided form — pick an IME, choose a strategy, record a keyboard shortcut (real-time capture dialog) — generates a live JSON preview with one-tap copy.
  • Profile management improvements: Redesigned card layout (name / package / strategy / buttons). New rename feature (edit dialog). Any profile can be deleted; builtins can be restored with one tap.
  • Import overwrite confirmation: A confirmation dialog now appears when importing a profile whose package name already exists.

Bug Fixes

  • Fixed Ctrl+Shift language switching not working: Profile storage refactored so the system process can reliably read configurations.
  • Fixed modifier-only key combos not being injected: Ctrl+Shift and similar combos now reach the IME correctly.

Note

  • Signature correction: The signatures of the apks downloaded from Release (here) and my website are now consistent. The difference in file size is a normal phenomenon due to different Gradle versions

Assets

1

7/3/2026, 8:28:03 PM

BetterZUIKey v1.4.0-beta1

Please scroll down for English / 英语请向下滚动

BetterZUIKey 迎来了 v1.4.0。本次更新重构了 Ctrl+Enter 的行为控制、新增了内置更新检查功能,并上线了项目专属网站。

Full Changelog: CommandPrompt-Wang/BetterZUIKey@9-v1.3.0-beta3...11-v1.4.0-beta1

更新

  • Ctrl+Enter 四档重构:原来的 Ctrl+Enter 仅有 QQ 前台相关的简单透传逻辑,现改为独立四档下拉——跟随系统 / 插入换行 / 透传 / 忽略。新增「插入换行」模式可以强行插入换行符。
  • 更新检查:设置页新增「启动时检查更新」开关与通道下拉(自动 / GitHub / GitHub 镜像 / 我的网站),长按卡片可立即检查。自动通道依次尝试 GitHub → GitHub 镜像 → 我的网站。
  • 网站我的网站 上线 BetterZUIKey 展示页与更新 API(/moe.lovefirefly.betterzuikey/latest.json),支持版本化 APK 下载与历史版本列表。
  • 版本显示修复:首页和帮助页不再固定为 v1.0。

欢迎志愿者提供镜像代理以优化地区访问性能。如有意向,请以 Issue 的形式申请。


BetterZUIKey v1.4.0-beta1

BetterZUIKey v1.4.0 redesigns Ctrl+Enter controls, adds a built-in update checker, and launches a dedicated project website.

Full Changelog: CommandPrompt-Wang/BetterZUIKey@9-v1.3.0-beta3...11-v1.4.0-beta1

Update

  • Ctrl+Enter 4-mode redesign: The previous Ctrl+Enter handling only offered basic pass-through logic for QQ. Now a dedicated four-mode spinner replaces it — Keep Default / Insert Newline / Pass-through / Block. The new "Insert Newline" mode force-inserts a line break character.
  • Update checker: "Check on startup" toggle + channel dropdown (Auto / GitHub / GitHub Mirror / My Website) added to Settings. Long-press the card to check immediately. Auto tries GitHub → GitHub Mirror → My Website in order.
  • Website: A project showcase page and update API (/moe.lovefirefly.betterzuikey/latest.json) are now live, with versioned APK downloads and a historical version listing.
  • Version display fix: The home page and help page now show the actual version instead of a hardcoded v1.0.

Welcome volunteer mirrors to improve regional access. Please file an Issue if interested.

Assets

1