add onBinary on CoreService, use for DEFAULT mouse reports
This commit is contained in:
@@ -23,6 +23,8 @@ export class CoreService implements ICoreService {
|
||||
public get onData(): IEvent<string> { return this._onData.event; }
|
||||
private _onUserInput = new EventEmitter<void>();
|
||||
public get onUserInput(): IEvent<void> { return this._onUserInput.event; }
|
||||
private _onBinary = new EventEmitter<string>();
|
||||
public get onBinary(): IEvent<string> { return this._onBinary.event; }
|
||||
|
||||
constructor(
|
||||
// TODO: Move this into a service
|
||||
@@ -59,4 +61,12 @@ export class CoreService implements ICoreService {
|
||||
this._logService.debug(`sending data "${data}"`, () => data.split('').map(e => e.charCodeAt(0)));
|
||||
this._onData.fire(data);
|
||||
}
|
||||
|
||||
public triggerBinaryEvent(data: string): void {
|
||||
if (this._optionsService.options.disableStdin) {
|
||||
return;
|
||||
}
|
||||
this._logService.debug(`sending binary "${data}"`, () => data.split('').map(e => e.charCodeAt(0)));
|
||||
this._onBinary.fire(data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user