Using unicode with Macintosh OSX

I use unicode on my Model 01. The reason unicode works for me, as far as I can tell, is that I have this in my sketch:

void unicodeCustomStart() {
kaleidoscope::hid::pressRawKey(Key_LeftAlt);
kaleidoscope::hid::pressRawKey(Key_LeftGui);
kaleidoscope::hid::pressRawKey(Key_Spacebar);
kaleidoscope::hid::sendKeyboardReport();
kaleidoscope::hid::releaseRawKey(Key_Spacebar);
kaleidoscope::hid::releaseRawKey(Key_LeftGui);
kaleidoscope::hid::releaseRawKey(Key_LeftAlt);
kaleidoscope::hid::sendKeyboardReport();
kaleidoscope::hid::pressRawKey(Key_LeftAlt);
}

void unicodeCustomInput() {
kaleidoscope::hid::pressRawKey(Key_LeftAlt);
}

void unicodeCustomEnd() {
kaleidoscope::hid::pressRawKey(Key_LeftGui);
kaleidoscope::hid::pressRawKey(Key_Spacebar);
kaleidoscope::hid::sendKeyboardReport();
kaleidoscope::hid::releaseRawKey(Key_Spacebar);
kaleidoscope::hid::releaseRawKey(Key_LeftGui);
kaleidoscope::hid::releaseRawKey(Key_LeftAlt);
kaleidoscope::hid::sendKeyboardReport();
}

And I also have this in my sketch:

HostOS.os(kaleidoscope::hostos::OTHER);

However, my operating system is not OTHER (or linux or whatever) it is OSX. I have a Macintosh.

I am using Unicode HEX input as my alternate keyboard layout in my system preferences on the Macintosh.

Everything works just fine, so I have nothing to complain about, but If I change the HostOS to OSX, unicode does not work any more. So this is something for other Macintosh users who might want to use unicode input. I wonder if there is something missing in the published code

1 Like