Provisioned VM Image Preparation

Nucleic-Session: 28559516-7571-4295-A21C-28B0B95D9427
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-07 03:40:43 -07:00
co-authored by nucleic
parent 6278f33e09
commit 779eb8660b
+8 -2
View File
@@ -247,9 +247,15 @@ final class HostIOSpike: NSObject, VZVirtualMachineDelegate {
window.sendEvent(e)
}
// Minimal ANSI keycodes for the spike's "hello" + return (the full table lives in
// VMAgentCore.KeyMap, a different package the spike can't import).
static let spikeKeyCodes: [Character: CGKeyCode] = [
"h": 0x04, "e": 0x0E, "l": 0x25, "o": 0x1F,
]
func postKey(_ ch: String) {
let code = KeyMap.stroke(forChord: ch)?.keyCode ?? 0
postKeyCode(CGKeyCode(code), chars: ch)
let code = ch.first.flatMap { Self.spikeKeyCodes[$0] } ?? 0
postKeyCode(code, chars: ch)
}
func postKeyCode(_ code: CGKeyCode, chars: String = "") {