fixed bind bug
This commit is contained in:
@@ -13,6 +13,7 @@ import static me.alpha432.oyvey.util.traits.Util.EVENT_BUS;
|
||||
public class MixinKeyboard {
|
||||
@Inject(method = "onKey", at = @At("TAIL"), cancellable = true)
|
||||
private void onKey(long windowPointer, int key, int scanCode, int action, int modifiers, CallbackInfo ci) {
|
||||
if (action != 1) return;
|
||||
KeyEvent event = new KeyEvent(key);
|
||||
EVENT_BUS.post(event);
|
||||
if (event.isCancelled()) ci.cancel();
|
||||
|
||||
Reference in New Issue
Block a user