Direct acess input

Hi, want to get a direct acess to the key and mouse listeners. The InputManager is a useful and safety solution when you only have a few keys but I want to get more power over my application.It is stupid to convert hashs to strings and later back to hash codes.

Therefore I need another solution.

Im not sure but I didnt find a way to implement this without creating a copy of the InputManager, rename it and make it to an extension of the InputManager. Now I can create an Interface with key and mouse events and add it to the new InputManager and call the methods during the processQueue. So is there a better way? Otherwise please add more advanced features to the InputManager.

RawInputListener



Why does RawInputListener not do what you want?

The InputManager is already in the Application and manages to put the input into a Queue and call the single events during the update method. Because of this it would be easier to use the InputManager instead of writing my own class which implements the RawInputListener and my own Application.

You register a RawInputListener with InputManager and it gives you all of the events. It bypasses the stuff you say you don’t want.



I’m trying to understand specifically what you are trying to do because it sounded like RawInputListener was exactly what you needed.

Uhm, why do you want to receive key events outside the update loop? Thats just not going with the architecture. If you want just some way to get input from a keyboard or joystick without having a jme3 application then use vanilla lwjgl or just jinput.

@pspeed Ah, i was confused because the InputManager implements the RawInputListener. Youre right, the RawInputListener is exactly what I need.