Input mapping specification v1: full pad -> keyboard + mouse (implements #154) #159
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX#159
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@bailu12300 on GitHub · 2026-11-26 08:26 UTC · original
Follow-up to #154, this time as a specification rather than a bug report, so it can be implemented by anyone.
Motivation: on a 32-lane NVIDIA host with no pad, the game is playable up to the equipment wheel, and that wheel cannot be operated. Reviewing gameinput.rs shows the 14 title buttons are all reachable, but two structural gaps remain: (a) triggers only exist as analog axes Z/C with no digital "held" channel, and (b) the mouse is deliberately excluded (Host::keys() starts at x08), so there is no look, no fire, and no menu pointer.
Below is the full mapping and the acceptance tests. I am implementing a first cut on my side (
9c23e8d) and will send a patch series if you want it.VIctory 全手柄 → 键盘 + 鼠标 输入映射规范(v1)
适用:
avatarmanz/VIctory-7900XTX及同源分支,crates/victory-hle/src/modules/gameinput.rs。目标:主机没有手柄、只有键鼠时,标题的每一个 pad 控件都能按到,所有"按住 + 方向"的菜单手势也能在键盘上完成。
1. 标题侧的 pad 位(源码已确认)
模拟量:
left_trigger/right_trigger0..1,left_x/left_y/right_x/right_y-1..1(上为正)。现状问题:14 个位都有键位,但 左右扳机只有 Z/C 两个模拟量,没有"按下阈值 → 数字触发"的通道;鼠标完全未接入(
keys()从 0x08 起,明确排除鼠标键);手柄扳机在菜单里常被当作"按住才出现转盘"的按钮,模拟量在 0.2~0.4 时标题收不到"按住"。2. 建议的默认映射(键鼠 → pad)
2.1 按钮
2.2 扳机(必须两条通道)
规则:
axis > 0.5时同时把该扳机视作"按住",供菜单/转盘使用;射击仍是模拟值。VICTORY_TRIGGER_DIGITAL=1强制数字化(无模拟手柄时的默认)。2.3 摇杆
dx/dy除以灵敏度后钳制到 ±1,取完回中鼠标视角参数建议:
VICTORY_LOOK_SCALE(像素满偏,默认 320)、VICTORY_LOOK_INVERT(Y 轴反向,默认 0)、VICTORY_MOUSE(总开关,默认 1)。3. 手势必须能复现
验收点:只用键盘,能完成 开转盘 → 选到任意一格 → 确认 → 关闭;只用鼠标,能完成 转视角 → 开火 → 开转盘 → 选中 → 确认。
4. 实现落点
FALLBACK_BUTTONS:补全为 14 位全覆盖 + 扳机数字通道常量表。Host::keys():范围改为0x01..=0xFE,包含鼠标键(0x01 左、0x02 右、0x04 中、0x05/0x06 X1/X2),但仍排除 0x10..=0x12 修饰键重复上报。fallback(keys):left_trigger = max(Z, 0x02)、right_trigger = max(C, 0x01);新增digital_triggers()让菜单能拿到"按住"。Host新增look():GetCursorPos取增量 → 右摇杆;仅在标题窗口位于前台时取,取完可选回中(VICTORY_LOOK_RECENTER=1,默认 1)。--print-inputs之类的小工具打印当前读数,方便用户自查。5. 待确认(需上游回答)
RB + 右摇杆,还是读RT 模拟量 + 右摇杆?这决定扳机是按钮还是轴。MENU长按(Esc 按住 0.5s 才生效)?keys()上报(标题可能把它们当普通按键)。@bailu12300 on GitHub · 2026-11-26 10:05 UTC · original
Withdrawn - the mapping proposed here does not belong in the project. Closing it.