File size: 512 Bytes
064bfd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import { Event } from './event.js'
export type TerminalFocusEventType = 'terminalfocus' | 'terminalblur'
/**
* Event fired when the terminal window gains or loses focus.
*
* Uses DECSET 1004 focus reporting - the terminal sends:
* - CSI I (\x1b[I) when the terminal gains focus
* - CSI O (\x1b[O) when the terminal loses focus
*/
export class TerminalFocusEvent extends Event {
readonly type: TerminalFocusEventType
constructor(type: TerminalFocusEventType) {
super()
this.type = type
}
}
|