diff --git a/packages/usb/switch-keymap.js b/packages/usb/switch-keymap.js index deb9e5a5..fcc5df0c 100755 --- a/packages/usb/switch-keymap.js +++ b/packages/usb/switch-keymap.js @@ -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) })();