Make switch-keymap.js accept a keymap abbreviation.
This commit is contained in:
@@ -2,7 +2,14 @@
|
||||
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, 'TES');
|
||||
const sendData = await uhk.switchKeymap(device, keymapAbbreviation);
|
||||
console.log(sendData)
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user