#include "os_detection.h"
void keyboard_post_init_user(void) {
uint32_t get_host_os(uint32_t trigger_time, void* cb_arg) {
switch (detected_host_os()) {
case OS_UNSURE: // Don't change default layer if unsure.
break;
case OS_MACOS: // On Mac, set default layer to 0.
case OS_IOS:
set_single_persistent_default_layer(0);
break;
default: // On Windows and Linux, set to 1.
set_single_persistent_default_layer(1);
break;
}
return 0;
}
// Set default layer based on the detected OS after a 500 ms delay.
defer_exec(500, get_host_os, NULL);
}