Fix for control keys on Windows 8.1 (thanks again, Jason Scott!)

This commit is contained in:
Brendan Robert 2015-03-29 14:35:44 -05:00
parent 959a496e59
commit 3fa800d791
1 changed files with 5 additions and 1 deletions

View File

@ -203,7 +203,7 @@ public class Keyboard implements Reconfigurable {
if (e.isConsumed()) {
return;
}
char c = 255;
if (e.getText().length() > 0) {
c = e.getText().charAt(0);
@ -245,6 +245,9 @@ public class Keyboard implements Reconfigurable {
c = fixShiftedChar(c);
}
if (e.isControlDown()) {
c = (char) (c & 0x01f);
}
if (c < 128) {
pressKey((byte) c);
@ -276,6 +279,7 @@ public class Keyboard implements Reconfigurable {
case ',': return '<';
case '.': return '>';
case '/': return '?';
case '`': return '~';
}
}
return c;