⌨️ KeyStrokes Overlay With Lua
一款高帧率、深度可定制的按键与鼠标覆盖层模组,适用于 Minecraft Fabric (1.19.4 – 26.3),由原生 Dear ImGui 和内置的 Lua 主题及脚本引擎驱动。
✨ 主要特性
- 原生 Dear ImGui 渲染(针对 PvP 优化):脏状态网格缓存、零分配缓冲区以及用于动画主题的 60Hz 上限,提供清晰的 TrueType 字体排印和矢量形状,几乎零 FPS 影响(空闲帧下
0ImGui/Lua CPU 占用,按键延迟即时为0 ms)。 - 无限 Lua 主题引擎:自定义每个按键(
renderKey+renderGroupBackground)或从头构建 100% 自由形式的 HUD(onImGuiDraw),支持圆角矩形、多角渐变、发光、投影、圆形、弧形、多边形、自定义.png/.jpg图像以及自定义.ttf/.otf字体。 - 8 种内置主题:
default.lua、minimal_pvp.lua、cyber_neon.lua、frosted_glass.lua、rgb_wave.lua、vapor_wave.lua、retro_terminal.lua和classic.lua(存储在config/keystrokes/ThemeManager/中,编辑后永不覆盖)。 - 实时热重载:在游戏中编辑你的
.lua脚本,并在设置中点击 Reload Lua 即可立即查看更改。 - 浮动拖拽移动设置 (
K):直接将键盘和鼠标覆盖层拖动到游戏画面上的任意位置,在 6 种内置颜色预设(Green、Red、Pink、Purple、Crimson、Gold)之间切换,或选择任何自定义的活跃 RGBA 颜色,并平滑缩放。 - 5 种键盘布局 + 完整鼠标覆盖层:
Full Keyboard、No NumPad、Horizontal Numbers、Vertical NumPad和Tryhard,以及LMB、MMB(带实时滚轮高亮)、RMB、BWD、FWD和实时 CPS 计数器。
🎮 控制与安装
- 为你的 Minecraft 版本(1.19.4 – 26.3)安装 Fabric Loader 和 Fabric API。
- 将下载的
.jar文件放入你的mods文件夹中。 - 在游戏中按
K打开设置,并将键盘/鼠标覆盖层拖动到屏幕上的任意位置。 - 随时按
Z以开启或关闭覆盖层。
📜 脚本指南:创建你自己的主题
在 config/keystrokes/ThemeManager/ 内创建任何 .lua 文件(将自定义图片放在 ThemeManager/assets/,自定义字体放在 ThemeManager/fonts/)。
单键主题示例 (renderKey)
-- 保存为 "my_theme.lua" 至 config/keystrokes/ThemeManager/
ANIMATED = false -- 设置为 true 以启用持续的 60Hz 动画
function renderKey(label, isPressed, x, y, w, h, r, g, b, a, ctx)
local accent = rgba(r, g, b, 255)
if isPressed then
drawGlow(x, y, w, h, 6, 5, withAlpha(accent, 170))
fillRounded(x, y, w, h, 6, rgba(r, g, b, 230))
setTextColor(rgba(12, 14, 18, 255))
else
fillRounded(x, y, w, h, 6, rgba(12, 14, 20, 175))
strokeRounded(x, y, w, h, 6, 1.2, withAlpha(accent, 180))
setTextColor(rgba(240, 244, 255, 240))
end
end
可用的 Lua API
- 钩子函数:
onThemeLoad()、onFrame(time, dt)、renderGroupBackground(x, y, w, h, isMouse, r, g, b, a, time)、renderKey(label, isPressed, x, y, w, h, r, g, b, a, ctx),以及带有imgui全局表的自由形式onImGuiDraw(ctx)。 ctx字段:anim、time、dt、cps、lmbCps、rmbCps、isMouse、code、holdTime、releaseTime。- 基本图元:
fill、fillGradient、fillGradientMulti、fillRounded、strokeRounded、fillPill、fillGradientRounded、drawGlow、drawShadow、fillCircle、strokeCircle、drawArc、drawLine、drawTriangle、drawPolygon、drawImage、drawText、drawCenteredText、drawSmoothText、measureText、suppressDefaultText(true)。 - 辅助函数:
rgba、rgb、hsv、withAlpha、lerp、clamp、lerpColor、easeOutCubic、easeOutBack、easeInOutSine。
💻 源代码与问题反馈
遵循 MIT License 开源 —— 浏览源代码或在 GitLab 上提交 Issue。
⌨️ KeyStrokes Overlay With Lua
A high-FPS, deeply customizable keystrokes & mouse overlay mod for Minecraft Fabric (1.19.4 – 26.3), powered by native Dear ImGui and an embedded Lua theme & scripting engine.
✨ Key Features
- Native Dear ImGui Rendering (PvP-Optimized): Dirty-state mesh caching, zero-allocation buffers, and a 60Hz cap for animated themes deliver crisp TrueType typography and vector shapes with virtually zero FPS impact (
0ImGui/Lua CPU on idle frames, instant0 mskeypress latency). - Limitless Lua Theme Engine: Customize every key (
renderKey+renderGroupBackground) or build 100% freeform HUDs from scratch (onImGuiDraw) using rounded rectangles, multi-corner gradients, glows, drop shadows, circles, arcs, polygons, custom.png/.jpgimages, and custom.ttf/.otffonts. - 8 Built-in Themes:
default.lua,minimal_pvp.lua,cyber_neon.lua,frosted_glass.lua,rgb_wave.lua,vapor_wave.lua,retro_terminal.lua, andclassic.lua(stored inconfig/keystrokes/ThemeManager/, never overwritten once edited). - Live Hot-Reloading: Edit your
.luascripts while playing and click Reload Lua in settings to see changes immediately. - Floating Drag-to-Move Settings (
K): Drag keyboard and mouse overlays anywhere directly over the live game, switch between 6 built-in color presets (Green,Red,Pink,Purple,Crimson,Gold) or pick any custom active RGBA color, and scale smoothly. - 5 Keyboard Layouts + Full Mouse Overlay:
Full Keyboard,No NumPad,Horizontal Numbers,Vertical NumPad, andTryhard+LMB,MMB(with live scroll-wheel highlight),RMB,BWD,FWD, and live CPS counters.
🎮 Controls & Installation
- Install Fabric Loader and Fabric API for your Minecraft version (1.19.4 – 26.3).
- Drop the downloaded
.jarinto yourmodsfolder. - Press
Kin-game to open settings and drag the keyboard/mouse anywhere on screen. - Press
Zanytime to toggle the overlay on or off.
📜 Scripting Guide: Create Your Own Theme
Create any .lua file inside config/keystrokes/ThemeManager/ (put custom images in ThemeManager/assets/ and custom fonts in ThemeManager/fonts/).
Per-Key Theme Example (renderKey)
-- Save as "my_theme.lua" in config/keystrokes/ThemeManager/
ANIMATED = false -- Set true for continuous 60Hz animations
function renderKey(label, isPressed, x, y, w, h, r, g, b, a, ctx)
local accent = rgba(r, g, b, 255)
if isPressed then
drawGlow(x, y, w, h, 6, 5, withAlpha(accent, 170))
fillRounded(x, y, w, h, 6, rgba(r, g, b, 230))
setTextColor(rgba(12, 14, 18, 255))
else
fillRounded(x, y, w, h, 6, rgba(12, 14, 20, 175))
strokeRounded(x, y, w, h, 6, 1.2, withAlpha(accent, 180))
setTextColor(rgba(240, 244, 255, 240))
end
end
Available Lua API
- Hooks:
onThemeLoad(),onFrame(time, dt),renderGroupBackground(x, y, w, h, isMouse, r, g, b, a, time),renderKey(label, isPressed, x, y, w, h, r, g, b, a, ctx), and freeformonImGuiDraw(ctx)with theimguiglobal table. ctxfields:anim,time,dt,cps,lmbCps,rmbCps,isMouse,code,holdTime,releaseTime.- Primitives:
fill,fillGradient,fillGradientMulti,fillRounded,strokeRounded,fillPill,fillGradientRounded,drawGlow,drawShadow,fillCircle,strokeCircle,drawArc,drawLine,drawTriangle,drawPolygon,drawImage,drawText,drawCenteredText,drawSmoothText,measureText,suppressDefaultText(true). - Helpers:
rgba,rgb,hsv,withAlpha,lerp,clamp,lerpColor,easeOutCubic,easeOutBack,easeInOutSine.
💻 Source Code & Issues
Open source under the MIT License — browse the source or open an issue on GitLab.
下载 KeyStrokes Overlay With Lua
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 KeyStrokes Overlay With Lua
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 KeyStrokes Overlay With Lua
下载 KeyStrokes Overlay With Lua
下载 KeyStrokes Overlay With Lua
下载 KeyStrokes Overlay With Lua
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 KeyStrokes Overlay With Lua
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 KeyStrokes Overlay With Lua
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 KeyStrokes Overlay With Lua
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 KeyStrokes Overlay With Lua
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
[v2026.11.29] - 2026-11-29
新增
- 原生 Dear ImGui 渲染引擎(
imgui-java 1.92.7.1),支持平滑的 TrueType 字体排版、清晰的矢量图形、可拖动的透明窗口,以及 6 种内置颜色预设(Green、Red、Pink、Purple、Crimson、Gold)。 - PvP 高帧率优化:
- 脏状态网格缓存(空闲帧下 ImGui/Lua CPU 占用为
0,按键时响应时间即时达到0 ms)。 - 可复用的零 GC 临时缓冲区及 PvP 曲线三角剖分。
- 对动态 Lua 主题限制 60Hz 刷新率,确保 300–450+ FPS 的游戏体验不受影响。
- 脏状态网格缓存(空闲帧下 ImGui/Lua CPU 占用为
- 统一 Lua 主题引擎,直接绘制到 Dear ImGui 的
ImDrawList上(同时支持基于按键的renderKey+renderGroupBackground主题和完全自由的onImGuiDraw脚本)。 - 8 款内置主题,生成于
config/keystrokes/ThemeManager/目录:default.lua、minimal_pvp.lua、cyber_neon.lua、frosted_glass.lua、rgb_wave.lua、vapor_wave.lua、retro_terminal.lua和classic.lua。 - 5 种键盘布局(
Full Keyboard、No NumPad、Horizontal Numbers、Vertical NumPad、Tryhard)以及鼠标覆盖层(LMB、MMB带实时滚轮高亮、RMB、BWD、FWD,并附带实时 CPS 计数器)。 - 多版本 Fabric 支持,适用于 Minecraft 1.19.4 – 26.3(共 13 个 Stonecutter 目标,兼容 Java 17/21/25)。
- 自动化质量与发布流水线:集成 GitLab CI 进行 SonarQube 静态分析,并通过 Minotaur 实现 Modrinth 的多版本自动发布。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧