Make switch-keymap.js accept a keymap abbreviation.

This commit is contained in:
László Monda
2018-03-30 19:17:42 +02:00
parent 0b420ff516
commit f196fcdaa2

View File

@@ -2,7 +2,14 @@
const uhk = require('./uhk'); const uhk = require('./uhk');
(async function() { (async function() {
const keymapAbbreviation = process.argv[2];
if (keymapAbbreviation === undefined) {
console.log('Usage: switch-keymap.js keymapName');
return;
}
const device = uhk.getUhkDevice(); const device = uhk.getUhkDevice();
const sendData = await uhk.switchKeymap(device, 'TES'); const sendData = await uhk.switchKeymap(device, keymapAbbreviation);
console.log(sendData) console.log(sendData)
})(); })();