MCPcopy
hub / github.com/felixrieseberg/windows95 / sendKeys

Method sendKeys

src/renderer/emulator.tsx:748–759  ·  view source on GitHub ↗

* Send keys to the emulator (including the key-up), * if it's running * * @param {Array } codes

(codes: Array<number>)

Source from the content-addressed store, hash-verified

746 * @param {Array<number>} codes
747 */
748 private sendKeys(codes: Array<number>) {
749 if (this.state.emulator && this.state.isRunning) {
750 const scancodes = codes;
751
752 // Push break codes (key-up)
753 for (const scancode of scancodes) {
754 scancodes.push(scancode | 0x80);
755 }
756
757 this.state.emulator.keyboard_send_scancodes(scancodes);
758 }
759 }
760
761 /**
762 * Reset the canvas

Callers 1

setupIpcListenersMethod · 0.95

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected