From 3fa800d7915a60501eb6a2d7d503ab34ecfc76e3 Mon Sep 17 00:00:00 2001 From: Brendan Robert Date: Sun, 29 Mar 2015 14:35:44 -0500 Subject: [PATCH] Fix for control keys on Windows 8.1 (thanks again, Jason Scott!) --- src/main/java/jace/core/Keyboard.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/jace/core/Keyboard.java b/src/main/java/jace/core/Keyboard.java index 3506fce..66ab1fe 100644 --- a/src/main/java/jace/core/Keyboard.java +++ b/src/main/java/jace/core/Keyboard.java @@ -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;