|
|
@ -60,6 +60,7 @@ void Unicode::start(void) {
|
|
|
|
void Unicode::input(void) {
|
|
|
|
void Unicode::input(void) {
|
|
|
|
switch (::HostOS.os()) {
|
|
|
|
switch (::HostOS.os()) {
|
|
|
|
case hostos::LINUX:
|
|
|
|
case hostos::LINUX:
|
|
|
|
|
|
|
|
break;
|
|
|
|
case hostos::WINDOWS:
|
|
|
|
case hostos::WINDOWS:
|
|
|
|
case hostos::OSX:
|
|
|
|
case hostos::OSX:
|
|
|
|
hid::pressRawKey(Key_LeftAlt);
|
|
|
|
hid::pressRawKey(Key_LeftAlt);
|
|
|
@ -100,7 +101,7 @@ void Unicode::typeCode(uint32_t unicode) {
|
|
|
|
if (on_zero_start == false) {
|
|
|
|
if (on_zero_start == false) {
|
|
|
|
Key key;
|
|
|
|
Key key;
|
|
|
|
if (::HostOS.os() == hostos::WINDOWS) {
|
|
|
|
if (::HostOS.os() == hostos::WINDOWS) {
|
|
|
|
key = hexToKeyWindows(digit);
|
|
|
|
key = hexToKeysWithNumpad(digit);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
key = hexToKey(digit);
|
|
|
|
key = hexToKey(digit);
|
|
|
@ -115,7 +116,7 @@ void Unicode::typeCode(uint32_t unicode) {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
Key key;
|
|
|
|
Key key;
|
|
|
|
if (::HostOS.os() == hostos::WINDOWS) {
|
|
|
|
if (::HostOS.os() == hostos::WINDOWS) {
|
|
|
|
key = hexToKeyWindows(digit);
|
|
|
|
key = hexToKeysWithNumpad(digit);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
key = hexToKey(digit);
|
|
|
|
key = hexToKey(digit);
|
|
|
@ -153,7 +154,7 @@ __attribute__((weak)) Key hexToKey(uint8_t hex) {
|
|
|
|
return { m, KEY_FLAGS };
|
|
|
|
return { m, KEY_FLAGS };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
__attribute__((weak)) Key hexToKeyWindows(uint8_t hex) {
|
|
|
|
__attribute__((weak)) Key hexToKeysWithNumpad(uint8_t hex) {
|
|
|
|
uint8_t m;
|
|
|
|
uint8_t m;
|
|
|
|
if (hex == 0x0) {
|
|
|
|
if (hex == 0x0) {
|
|
|
|
return Key_Keypad0;
|
|
|
|
return Key_Keypad0;
|
|
|
|