Files
orca/tests/e2e/helpers/windows-ime-native-events.ts
mirror 34fa2cd5ca
Skill update round trip / roundtrip (false, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, ubuntu-latest, symlink, latest) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (false, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, macos-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, ubuntu-latest, symlink, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, copy, 1.5.17) (push) Canceled after 0s
Skill update round trip / roundtrip (true, windows-latest, symlink, 1.5.17) (push) Canceled after 0s
source snapshot 2026-09-02
2026-09-02 02:03:16 +08:00

49 lines
1.3 KiB
TypeScript

import { readFileSync } from 'node:fs'
import type { CDPSession } from '@stablyai/playwright-test'
export function readPtyInputs(inputLogPath: string): string[] {
return readFileSync(inputLogPath, 'utf8')
.split('\n')
.filter(Boolean)
.map((line) => JSON.parse(line) as string)
}
export function readPtyInputCount(inputLogPath: string): number {
return readPtyInputs(inputLogPath).length
}
export async function dispatchWindowsImeShiftToggle(session: CDPSession): Promise<void> {
await session.send('Input.dispatchKeyEvent', {
type: 'rawKeyDown',
key: 'Process',
code: 'ShiftLeft',
windowsVirtualKeyCode: 229,
nativeVirtualKeyCode: 229,
modifiers: 8
})
await session.send('Input.dispatchKeyEvent', {
type: 'rawKeyDown',
key: 'Shift',
code: 'ShiftLeft',
windowsVirtualKeyCode: 16,
nativeVirtualKeyCode: 16,
modifiers: 8
})
await session.send('Input.dispatchKeyEvent', {
type: 'keyUp',
key: 'Process',
code: 'ShiftLeft',
windowsVirtualKeyCode: 229,
nativeVirtualKeyCode: 229,
modifiers: 8
})
await session.send('Input.dispatchKeyEvent', {
type: 'keyUp',
key: 'Shift',
code: 'ShiftLeft',
windowsVirtualKeyCode: 16,
nativeVirtualKeyCode: 16
})
await session.send('Input.insertText', { text: 's' })
}