1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-06 01:28:57 +00:00

Ensures keys without symbols are forwarded.

This commit is contained in:
Thomas Harte 2020-02-29 22:37:15 -05:00
parent 86a09b5e7d
commit 560394fead

View File

@ -504,17 +504,23 @@ struct ActivityObserver: public Activity::Observer {
}
}
// If this is logical mode and this key maps to a symbol, supply it
// as something to type. If this isn't logical mode, or this key doesn't
// map to a symbol, pass it along as a standard press.
if(self.inputMode == CSMachineKeyboardInputModeKeyboardLogical) {
if(isPressed) {
@synchronized(self) {
char string[2] = { pressedKey, 0 };
keyboard_machine->type_string(string);
if(pressedKey) {
if(isPressed) {
@synchronized(self) {
char string[2] = { pressedKey, 0 };
keyboard_machine->type_string(string);
}
}
return;
}
} else {
@synchronized(self) {
keyboard.set_key_pressed(mapped_key, pressedKey, isPressed);
}
}
@synchronized(self) {
keyboard.set_key_pressed(mapped_key, pressedKey, isPressed);
}
return;