Skip to content
aniikikiPublic
forked from TOM-BadEN/KeyX

About

Nintendo Switch - Supports Turbo, Remapping and Macro.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

454 Commits

Folders and files

Repository files navigation

🇨🇳 中文 | EN English

KeyX.mp4

中文

注意

  • 注意:因为SWITCH的底层特殊机制,部分功能表现可能有瑕疵,具体见下表。
  • 我并非程序员,已经尽力了,虽有瑕疵,但至少各功能属于能用的状态。
  • 想要完美实现所有功能,需要通过大气层的MITM劫持来达到,但是我不会,而且需要完全重构。

当前功能瑕疵表现

功能 Joycon 三方分体(双子星2代) JC(蓝牙) LITE 三方常规 (八爪鱼4) PRO
按键连发 完美 ① 完美 ① 不可用 完美 可用 ② 未测试 ③
按键映射 完美 完美 完美 完美 完美 完美
按键宏 完美 完美 不可用 完美 完美 未测试 ③
组合功能 Joycon 三方分体(双子星2代) JC(蓝牙) LITE 三方常规 (八爪鱼4) PRO
连发 + 映射 完美 ① 完美 ① 不可用 完美 可用 ② 未测试 ③
连发 + 宏 宏播放期间,自动屏蔽连发功能
映射 + 宏 如果播放的宏的按键,恰好是修改了映射的按键,可能出现输入不对的情况

说明:

  • ① 仅允许单边的手柄进行连发。因为未知原因,若两侧都支持连发的话,会出现完全停止按键后,摇杆无法自动归0,需要手动碰一下才能恢复正常。
  • ② 小概率完全停止按键后,摇杆无法自动归0,需要手动碰一下才能恢复正常。
  • ③ 理论上与八爪鱼效果一致,但是我没有PRO手柄,所以只能说理论

KeyX 按键助手

platform Latest Version

Nintendo Switch 按键助手,支持连发、按键重新分配、按键宏和触摸映射。且拥有全局或游戏独立配置,根据记忆自动启动功能。 整个插件由特斯拉插件与系统模块两部分组成。

功能

Tesla界面
录制按键宏

  • 美观现代的UI设计
  • 可动态修改连发与映射按键
  • 可使用特斯拉直接录制按键宏,且功能引导完善
  • 主页的蓝色图标代表该按键修改了映射
  • 主页的黄色角标代表该按键启用了连发
  • 主页的紫色角标代表停止键,绿色角标代表连发功能键
  • 主页的红色角标代表该按键绑定了宏

按键映射

  • 支持 16 个按键互相映射 (A/B/X/Y/L/R/ZL/ZR/十字键/SELECT/START/L3/R3)
  • 与连发功能可同时启用,不会有冲突
  • 完美避开系统关于按键修改后的警告弹窗
  • 全局配置和游戏独立配置
  • 自动记忆开关状态

按键连发

  • 支持 12 个按键连发(A/B/X/Y/L/R/ZL/ZR/十字键)
  • 支持多个按键同时连发
  • 连发频率可在每秒 1~10 次之间调整
  • 可选一个始终透传的连发功能键:未设置时保持直接连发;设置后需组合触发按住或切换连发
  • 每个按键可独立选择按住连发或按下切换连发;切换连发通过单独的停止键关闭
  • 停止键和功能键不能同时设为连发键;停止键按下后停止所有切换连发,不影响仍被按住的按住连发
  • 连发时支持非连发键正常使用
  • 可设置按下和松开时长
  • 全局配置和游戏独立配置
  • 自动记忆开关状态
  • KeyX 的 Tesla 前端打开时会暂停连发、宏、触摸映射和按键映射

触摸映射

  • 屏幕左半区域和右半区域可分别映射为一个按键,并可同时触发
  • 手指落下时确定区域,滑过屏幕中线不会改变本次触摸的目标按键
  • 映射出的按键会复用该按键现有的普通、按住连发、切换连发、停止键和功能键逻辑
  • 点击输出至少保持 50ms,避免过短触摸丢失
  • 支持全局配置和游戏独立配置,并自动记忆开关状态
  • 不拦截游戏原始触摸事件,主要用于本身不支持触摸操作的游戏

按键宏

  • 自动记忆宏功能开关状态
  • 摇杆与按键状态均会被录制
  • 最大录制时长为30s
  • 录制帧率为60FPS
  • 按一下对应快捷键为单次播放
  • 按住对应快捷键为循环播放
  • 播放期间再次按下快捷键取消播放
  • 精巧美观的宏编辑器

内存占用

  • 系统模块仅占用 550 KB

安装

将文件复制到 SD 卡根目录:

/atmosphere/contents/4100000002025924/
/switch/.overlays/ovl-KeyX.ovl

从旧版本升级时,请手动删除已废弃的通知模块和语言资源目录:

/atmosphere/contents/0100000000251020/
/switch/.overlays/lang/KeyX/

编译

cd sys-KeyX && make -j
cd ovl-KeyX && make -j

或者直接根目录

cd KeyX && make

感谢


English

Notice

  • Note: Due to the special underlying mechanism of SWITCH, some functions may have flaws. See the table below for details.
  • I am not a professional programmer. I have tried my best. Although there are flaws, at least all functions are usable.
  • To perfectly implement all functions, it requires MITM hijacking through Atmosphere, but I don't know how, and it would require a complete refactoring.

Current Function Performance Issues

Function Joycon 3rd-Party Split (MoPai Twin Star Gen2) JC(Bluetooth) LITE 3rd-Party Regular (Octopus 4) PRO
Turbo Perfect ① Perfect ① Not Available Perfect Available ② Not Tested ③
Key Mapping Perfect Perfect Perfect Perfect Perfect Perfect
Macro Perfect Perfect Not Available Perfect Perfect Not Tested ③
Combined Functions Joycon 3rd-Party Split (MoPai Twin Star Gen2) JC(Bluetooth) LITE 3rd-Party Regular (Octopus 4) PRO
Turbo + Mapping Perfect ① Perfect ① Not Available Perfect Available ② Not Tested ③
Turbo + Macro Turbo function temporarily disabled during macro playback
Mapping + Macro If the keys being played have been remapped, incorrect input may occur

Notes:

  • ① Only one side of the controller is allowed to use turbo mode. For unknown reasons, if both sides support turbo, the joystick may fail to auto-reset after completely stopping button presses, requiring manual touch to restore.
  • ② Low probability that after completely stopping button presses, the joystick may fail to auto-reset, requiring manual touch to restore.
  • ③ Theoretically the same effect as Octopus, but I don't have a PRO controller, so it's just theoretical.

KeyX Button Assistant

platform Latest Version

Nintendo Switch button assistant supporting turbo, key remapping, macro recording, and touch mapping. Features global or per-game configuration with auto-start memory. The complete plugin consists of Tesla overlay and system module.

Features

Tesla UI
Macro Recording

  • Beautiful and modern UI design
  • Dynamically modify turbo and mapping settings
  • Record macros directly using Tesla overlay with comprehensive guidance
  • Blue icons on home page indicate remapped buttons
  • Yellow badges indicate turbo-enabled buttons
  • Red badges indicate macro-bound buttons

Key Mapping

  • Remap 16 buttons (A/B/X/Y/L/R/ZL/ZR/D-pad/SELECT/START/L3/R3)
  • Works together with turbo without conflicts
  • Perfectly avoids system warning popups about button changes
  • Global and per-game configuration
  • Auto-remembers on/off state

Turbo

  • Turbo for 12 buttons (A/B/X/Y/L/R/ZL/ZR/D-pad)
  • Multiple buttons can turbo simultaneously
  • Each button can independently use hold-to-turbo or press-to-toggle turbo; toggle turbo uses a separate stop key
  • The stop key cannot also be a turbo key; it stops all toggle turbo without interrupting held hold-to-turbo buttons
  • Non-turbo buttons work normally during turbo
  • Customizable press and release duration
  • Global and per-game configuration
  • Auto-remembers on/off state
  • Turbo, macros, touch mapping, and button mapping pause while the KeyX Tesla frontend is open

Touch Mapping

  • Map the left and right halves of the screen to separate buttons and use both at once
  • The initial touch position locks the region even if the finger crosses the center line
  • Synthetic buttons reuse their normal, hold-turbo, toggle-turbo, and stop-key behavior
  • Each tap is held for at least 50ms so very short touches are not lost
  • Supports global and per-game configurations with remembered on/off state
  • Original touch events are not intercepted; this is intended mainly for games without touch controls

Macro

  • Auto-remembers macro function on/off state
  • Both stick and button states are recorded
  • Maximum recording duration: 30 seconds
  • Recording frame rate: 120 FPS
  • Press shortcut key once for single playback
  • Hold shortcut key for loop playback
  • Press shortcut key again during playback to cancel
  • beautiful macro editor

Memory Usage

  • System module: only 550 KB

Installation

Copy files to SD card root:

/atmosphere/contents/4100000002025924/
/switch/.overlays/ovl-KeyX.ovl

When upgrading from an older version, manually delete the obsolete notification module and language resource directories:

/atmosphere/contents/0100000000251020/
/switch/.overlays/lang/KeyX/

Build

cd sys-KeyX && make -j
cd ovl-KeyX && make -j

Or from root directory:

cd KeyX && make

Credits

About

Nintendo Switch - Supports Turbo, Remapping and Macro.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages