Restore stable F11 KeyChanger toggle behavior; add LiveSplit docs; introduce configurable checkpoint voice prompts#10
Draft
Copilot wants to merge 3 commits into
Draft
Conversation
Agent-Logs-Url: https://github.com/othercat/PalTimer/sessions/fcd49260-9684-4808-b7e1-a4a693909463 Co-authored-by: othercat <509048+othercat@users.noreply.github.com>
Agent-Logs-Url: https://github.com/othercat/PalTimer/sessions/fcd49260-9684-4808-b7e1-a4a693909463 Co-authored-by: othercat <509048+othercat@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Restore old F11 KeyChanger behavior to disable without killing process
Restore stable F11 KeyChanger toggle behavior; add LiveSplit docs; introduce configurable checkpoint voice prompts
Apr 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses three requested items: revert the F11 KeyChanger regression to legacy behavior (toggle only, no process restart), add LiveSplit-focused documentation under
docs/, and add configurable checkpoint voice prompts (checkpoint/faster/slower) with external mp3/wav support.F11 KeyChanger behavior regression fix (Pal98Timer/GForm.cs)
Disable()/Enable()onlyClose()on disable andOpen()+waiton enableCheckpoint voice prompt feature (new
Pal98Timer/VoicePrompt.cs+ TimerCore integration)VoicePromptstatic service with:PlaySound(string filePath)PlayCheckpointSound(string checkpointName)PlayFasterSound()PlaySlowerSound()voice_config.txt-based configuration loading:checkpoint.<name>=.../cp.<name>=...)TimerCore.Checking():mciSendString(no external dependency) and supports bothsounds/andvoice/directories..mp3/.wavonly).Project wiring
VoicePrompt.csinPal98Timer.csproj.Documentation additions (
docs/)docs/livesplit_pal98_kb.mdstate/start/split/reset/isLoading)docs/TODO_PLAN.mdOriginal prompt
本PR需要处理三个任务:
任务1:恢复F11 KeyChanger的老版本行为(只禁用不杀进程)
当前 master 分支
Pal98Timer/GForm.cs中 F11 的处理逻辑是:禁用改键时调用KeyChangerDel.Close()杀掉 keychanger.exe 进程,启用时调用KeyChangerDel.Open()重新启动进程。这导致 F11 有时不能让 keychanger.exe 正常出现。需要恢复为 commit
286f7cf4fae11fcaa7762b551b354cc88eac76b5的做法:F11只切换 Enable/Disable 状态,不杀掉也不重启进程。当前代码(需要修改)在
Pal98Timer/GForm.cs约第544-568行:需要恢复为老版本的简洁逻辑:
任务2:在 docs 目录下生成 LiveSplit 知识库文件和 TODO_PLAN
在项目根目录创建
docs/目录(如果不存在),并生成以下文件:2a.
docs/livesplit_pal98_kb.md— LiveSplit 与仙剑98 DX9 的知识库内容应包含:
2b.
docs/TODO_PLAN.md— 未来可加入的功能规划列出可以从 LiveSplit 生态借鉴或集成的功能,例如:
任务3:节点语音提示功能设计与实现
在项目中加入节点语音提示功能。具体需求:
sounds/或voice/)下放置自己的 mp3 或 wav 文件。sounds/slower.mp3或用户自定义文件)sounds/faster.mp3或用户自定义文件)sounds/节点��.mp3)voice_config.txt)来配置:System.Media.SoundPlayer(仅支持 wav)或引用NAudio等库来播放 mp3。考虑到简单性和不增加外部依赖,可以先用 Windows APImciSendString来播放 mp3/wav,这在 WinForms 中很常见。在
Pal98Timer项目中创建一个新的VoicePrompt.cs类,提供:PlaySound(string filePath)— 播放音频文件PlayCheckpointSound(string checkpointName)— 播放节点到达提示PlayFasterSound()/PlaySlowerSound()— 播放快了/慢了提示TimerCore或检查点切换逻辑中集成调用同时在
docs/TODO_PLAN.md中也要体现语音提示功能的规划。The following is the prior conversation context from the user's chat exploration (may be truncated):
User: 目前主分支是最新代码,现在有三个事情要处理:1. 最新代码当中,按F11有时候不能让keychanger.exe正常出现,所以keychanger的改键就失效。但是commit 286f7cf 是正常的,所以要对比看看是怎么回事。如果区别是新版变成要杀掉keychanger.exe进程而老版本只是禁用不是杀掉进程,那可以恢复老版本的做法。2. livesplit也是很著名的开源计时器,而且也能通过修改插件支持仙剑98DX9,可以帮忙生成docs下的kb文件作为知识库,并且列一个TODO_PLAN,表示可以加入一些功能的。3. 节点加入语音提示,并且可以自己定义mp3/wav,如果这个节点慢或者快了,就可以有节点慢或者快的语音播放,然后这个语音播放最好是外部的mp3放自己想要的提示语音。
Assistant: Now let me get the old version's F11 handling in GForm.cs and compare with the current version:
Assistant: 我已经完成了对比分析,现在来汇总三个任务的结果,并创建一个 PR 来处理所有问题。
任务1分析:F11 KeyChanger 问题
对比 commit
286f7cf4和当前 master 的 F11 处理逻辑,确认了你的猜测:老版本 (286f7cf) — 只是切换 Enable/Disable,不杀进程:
新版本 (master) — 禁用时杀掉进程,启用时重新启动进程: