Add keyboard shortcut for enabling the USB stack test mode of the firmware. Resolves #735.

This commit is contained in:
László Monda
2018-07-26 05:34:48 +02:00
parent b82a1da92a
commit ac7d66e338
8 changed files with 65 additions and 3 deletions
@@ -87,6 +87,15 @@ export class DeviceService {
});
});
ipcMain.on(IpcEvents.device.enableUsbStackTest, (...args: any[]) => {
this.queueManager.add({
method: this.enableUsbStackTest,
bind: this,
params: args,
asynchronous: true
});
});
logService.debug('[DeviceService] init success');
}
@@ -224,6 +233,10 @@ export class DeviceService {
event.sender.send(IpcEvents.device.updateFirmwareReply, response);
}
public async enableUsbStackTest(event: Electron.Event) {
await this.device.enableUsbStackTest();
}
/**
* HID API not support device attached and detached event.
* This method check the keyboard is attached to the computer or not.