(option: KeyEncoderOption, value: boolean | number)
| 173 | } |
| 174 | |
| 175 | setOption(option: KeyEncoderOption, value: boolean | number): void { |
| 176 | const valuePtr = this.exports.ghostty_wasm_alloc_u8(); |
| 177 | const view = new DataView(this.exports.memory.buffer); |
| 178 | view.setUint8(valuePtr, typeof value === 'boolean' ? (value ? 1 : 0) : value); |
| 179 | this.exports.ghostty_key_encoder_setopt(this.encoder, option, valuePtr); |
| 180 | this.exports.ghostty_wasm_free_u8(valuePtr); |
| 181 | } |
| 182 | |
| 183 | setKittyFlags(flags: KittyKeyFlags): void { |
| 184 | this.setOption(KeyEncoderOption.KITTY_KEYBOARD_FLAGS, flags); |
no test coverage detected