Reply – Java3D Adding KeyListener to Canvas. Key Dont Fire.
Your Name
Subject
Message
or Cancel
In Reply To
Java3D Adding KeyListener to Canvas. Key Dont Fire.
— by Andrew Andrew
Hiah.

For a school project, a professor of mine is requiring that we use Java3D to create an application. I'm creating a small minigolf game, and want to use keyboard inputs to shoot the ball around; I've run into an issue though. When I add a KeyListener to the Canvas3D object, some keys stop responding. I am not sure what's causing this. To debug, I've created a simple KeyListener implementation, where I only print the key being pressed and nothing more. When I run the application, I press Q. The console prints Q. I press Q again, the console no longer prints Q. I press Space, it prints. I press Q again, still nothing. I press E, nothing. I press Control, it prints. Some keys print, some do not.

I am not sure what version of Java3D we're using, he included the jar files on his own website.
j3dcore.jar
j3dutils.jar
jog amp-fat.jar
vecmath.jar

They're from 2017.