Add example for switch-case.

This commit is contained in:
László Monda
2017-09-29 02:26:01 +02:00
committed by GitHub
parent 0624d088b6
commit fad17aeb32

View File

@@ -60,6 +60,18 @@ if (something) {
... ...
} }
switch (currentMacroAction.key.type) {
case KeystrokeType_Basic:
addBasicScancode(currentMacroAction.key.scancode);
break;
case KeystrokeType_Media:
addMediaScancode(currentMacroAction.key.scancode);
break;
case KeystrokeType_System:
addSystemScancode(currentMacroAction.key.scancode);
break;
}
for (uint8_t i = 0; i < j; i++) { for (uint8_t i = 0; i < j; i++) {
... ...
} }