Jump to content

1.15 key press event


Scholler

Recommended Posts

31 minutes ago, ChampionAsh5357 said:

First, use a key binding. Second, using KeyInputEvent allows you to get the key action (pressed, held, released).

So KeyBinding is like keyBindings[0] = new KeyBinding("Blabla..", KeyValue, "blabla");
It was working in 1.12 but there is no org.lwjgl.input.Keyboard to use in 1.15 forge

Link to comment
Share on other sites

51 minutes ago, Scholler said:

So KeyBinding is like keyBindings[0] = new KeyBinding("Blabla..", KeyValue, "blabla");
It was working in 1.12 but there is no org.lwjgl.input.Keyboard to use in 1.15 forge

No... create a static KeyBinding and instantiate it in FMLClientSetupEvent. In the same event, register it to the client using ClientRegistry::registerKeyBinding

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.