Skip to content

Commit 3a62c0b

Browse files
ScribbleScribble
authored andcommitted
Another fix...
1 parent c3397f6 commit 3a62c0b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/main/java/de/scribble/lp/tasmod/virtual/VirtualInput.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,6 @@ public void updateNextKeyboard(int keycode, boolean keystate, char character) {
120120

121121
// System.out.println(keycode+" "+keystate+" "+character);
122122

123-
if (VirtualKeybindings.isKeyCodeAlwaysBlocked(keycode)) {
124-
return;
125-
}
126-
VirtualKey key = nextKeyboard.get(keycode);
127-
key.setPressed(keystate);
128123
if (keystate) {
129124
character = nextKeyboard.encodeUnicode(keycode, character);
130125
} else {
@@ -133,6 +128,11 @@ public void updateNextKeyboard(int keycode, boolean keystate, char character) {
133128
}
134129
}
135130
nextKeyboard.addChar(character);
131+
if (VirtualKeybindings.isKeyCodeAlwaysBlocked(keycode)) {
132+
return;
133+
}
134+
VirtualKey key = nextKeyboard.get(keycode);
135+
key.setPressed(keystate);
136136
}
137137

138138
public List<VirtualKeyboardEvent> getCurrentKeyboardEvents() {
@@ -264,6 +264,9 @@ public VirtualMouse getNextMouse() {
264264

265265
public void updateNextMouse(int keycode, boolean keystate, int scrollwheel, int cursorX, int cursorY, boolean filter) {
266266

267+
if (VirtualKeybindings.isKeyCodeAlwaysBlocked(keycode)) {
268+
return;
269+
}
267270
boolean flag = true;
268271
if (filter) {
269272
flag = nextMouse.isSomethingDown() || scrollwheel != 0 || keycode != -1;

0 commit comments

Comments
 (0)