Files
agent/packages/usb/switch-keymap.js
2018-03-30 19:17:42 +02:00

16 lines
390 B
JavaScript
Executable File

#!/usr/bin/env node
const uhk = require('./uhk');
(async function() {
const keymapAbbreviation = process.argv[2];
if (keymapAbbreviation === undefined) {
console.log('Usage: switch-keymap.js keymapName');
return;
}
const device = uhk.getUhkDevice();
const sendData = await uhk.switchKeymap(device, keymapAbbreviation);
console.log(sendData)
})();