I have a teensyduino that is connected to the computer as a Keyboard & Mouse.
Teensy receives characters over the serial pin. It works flawlessly on the computer. If I send "#!A" it sends "#!A" to the laptop. However, when I launch the VM (both are windows 10) on the same computer, it receives "31a". (Notice that the # corresponds to 3 on the keyboard.)
This makes no sense, as it is the same code and same computer essentially, but somehow the VM does not see any special characters or caps and the laptop does. What could be causing this? I checked the keyboard settings in the VM and it is set to US standard, same as the laptop itself.
I would understand if the VM didn't receive any keys at all, but why would it receive the wrong keys?
I am sending other commands such as "arrow up", etc and those are working fine on the VM.
Here's the code:
Teensy receives characters over the serial pin. It works flawlessly on the computer. If I send "#!A" it sends "#!A" to the laptop. However, when I launch the VM (both are windows 10) on the same computer, it receives "31a". (Notice that the # corresponds to 3 on the keyboard.)
This makes no sense, as it is the same code and same computer essentially, but somehow the VM does not see any special characters or caps and the laptop does. What could be causing this? I checked the keyboard settings in the VM and it is set to US standard, same as the laptop itself.
I would understand if the VM didn't receive any keys at all, but why would it receive the wrong keys?
I am sending other commands such as "arrow up", etc and those are working fine on the VM.
Here's the code:
Code:
void setup()
{
Serial.begin(9600);
Keyboard.begin();
}
void loop()
{
if (Serial.available()) {
incomingByte = Serial.read(); // will not be -1
Keyboard.write(incomingByte);
}
}
Last edited: