快速导航: 中文版本 | English Version
KernelFix 是一款 Hacknet 的 Pathfinder / BepInEx 全局插件,提供两大核心功能:
- 高 DPI 显示修复 – 解决近代高分屏下分辨率错误放大的问题。
- 原生中文输入法支持 – 在游戏终端内完美使用 Windows 自带输入法,并自绘候选词窗口。
- 在游戏窗口创建前调用
SetProcessDPIAware()。 - 避免 Windows 的 DPI 虚拟化,使游戏分辨率列表与实际屏幕一致。
- 消除全屏/窗口模式下的模糊和错误缩放。
- 通过 ImeSharp 接入 Windows TSF (Text Services Framework)。
- 组合文本(拼音/字母)直接显示在终端光标处,并带有下划线。
- 候选词列表以半透明面板绘制在终端左下角,支持长词自动适应宽度。
- 使用 数字键 1‑9 或 空格键 选词上屏,使用
[]来切换候选页数。 - 兼容微软拼音、微软五笔以及绝大多数基于 TSF 的输入法。
- 提供 调试开关(
KernelFix.cs中的KernelFix.Debug),设为true可在控制台输出详细的输入法状态。
- 确保已安装 Pathfinder 框架(它自带了 BepInEx)。
- 下载
KernelFix.dll。 - 将文件放入游戏目录下的
BepInEx/plugins/文件夹内。 - 启动游戏,插件即自动生效。
无需额外安装 BepInEx – Pathfinder 已包含所需运行环境。
-
建议与 HacknetFontReplace 同时使用以解决部分字显示为
?的问题。注:HacknetFontReplace默认不支持打出UTF-16的字符或emoji,在候选框中会显示为空白,暂不清楚是否为默认无对应字体导致,请避免打出此类字符以防游戏出现故障
-
与
TAXCoreCNfix不兼容,两者同时加载会导致输入冲突。请在使用 KernelFix 前移除TAXCoreCNfix。 -
需要 Pathfinder 框架,否则插件不会加载。
-
支持 Steam 及 非 Steam 版本的 Hacknet + Labyrinths。
- 克隆仓库:
git clone https://github.com/LDTchara/KernelFix.git
- 使用 Visual Studio 打开
KernelFix.sln(或通过dotnet命令行构建):dotnet build KernelFix.sln -c Release
- 项目引用(Harmony、BepInEx、FNA 等)指向游戏安装目录下的
libs文件夹,可按需调整。 - 采用 Costura.Fody 将
ImeSharp及其依赖嵌入 DLL,生成的KernelFix.dll即为独立文件,无需其他附加库。
KernelFix is a Pathfinder / BepInEx global plugin for Hacknet that delivers two major quality‑of‑life improvements:
- High‑DPI display fix – resolves incorrect upscaling on modern high‑DPI screens.
- Native Chinese IME support – fully integrates Windows IME into the terminal, with an on‑screen composition preview and a self‑drawn candidate list.
- Calls
SetProcessDPIAware()before the game window is created. - Prevents Windows DPI virtualization, matching the in‑game resolution list to the actual display.
- Eliminates blurry text and improper scaling in both fullscreen and windowed modes.
- Leverages Windows TSF (Text Services Framework) via ImeSharp.
- Composition text (pinyin / letters) is displayed directly at the cursor with an underline.
- Candidate list is drawn as a semi‑transparent panel in the lower‑left corner of the terminal, with automatic width adjustment for long phrases.
- Select candidates with number keys 1‑9 or Space, and use
[]to flip pages. - Compatible with Microsoft Pinyin, Microsoft Wubi, and most other TSF‑based IMEs.
- Includes a debug switch (
KernelFix.DebuginKernelFix.cs); set it totrueto log detailed IME status to the console.
- Make sure Pathfinder is installed (it bundles BepInEx).
- Download
KernelFix.dll. - Place it into
BepInEx/plugins/inside your Hacknet directory. - Launch the game – the plugin loads automatically.
No separate BepInEx installation is required – Pathfinder already provides it.
-
It is recommended to use KernelFix together with HacknetFontReplace to fix missing glyphs (displayed as
?).Note: HacknetFontReplace may not render UTF‑16 surrogate characters or emoji correctly; they will appear blank in the candidate list. Avoid typing such characters to prevent potential game issues.
-
KernelFix is incompatible with
TAXCoreCNfix. Using both simultaneously will cause input conflicts. Please removeTAXCoreCNfixbefore using KernelFix. -
Requires Pathfinder; the plugin will not load without it.
-
Works with both Steam and non‑Steam versions of Hacknet + Labyrinths.
- Clone the repository:
git clone https://github.com/LDTchara/KernelFix.git
- Open
KernelFix.slnin Visual Studio (or build withdotnet):dotnet build KernelFix.sln -c Release
- The project references (Harmony, BepInEx, FNA, etc.) point to the
libsfolder inside your Hacknet installation; adjust them if necessary. - Costura.Fody embeds
ImeSharpand its dependencies into the DLL – the outputKernelFix.dllis self‑contained and requires no extra libraries.
