Problem with KeyInput in CVS version

Now that i finally have jME checked out and built from CVS, i’m trying to use it at the moment. To take advantage of the nice new features that have kindly been implemented/fixed after my request (thx again :slight_smile:





Of course it is an under-construction version. Of course things change and applications have to be adapted to the changed code.

But i wonder if it is really supposed to be used ?



For example:

I quickly found out about the changes in input, like the deprecated getMouseInput() (found this), so i change my code accordingly. No problem.



But what about KeyInput?

I was using the .isKeyDown() method so far.

As I’ve seen, it moved to the KeyboardController Interface, implemented by the AbstractGameController.



But how do i use it now?



I don’t want to instantiate a BasicController, because i have no entity to be controlled with that key. I only want to listen to a KeyInput…

And even if I would want, I can’t even locate “jme.controller.*”







For me, this is a pretty “diffuse” problem right now, ecountered after just 5 minutes of adapting my code to the CVS version of jME.

And i guess changes like that are not that seldom, right?

Maybe i get to the KeyInput with some help, but i could imagine tomorrow (or so), i encounter another temporary-state-of-development change in jME, making me completely stuck or something…





So, to (finally) come back to the title:

Right now, it seems like a not so good idea to me to try to use the CVS code for developing an application…

Or am i exaggerating, just confused by the changes in input-stuff? :frowning:

First of all, take a deep breath and relax…



Of course CVS is usable. Every test, app that we control is insured to be working.



Now, I'm finding it difficult to actually figure out what you are having trouble with, you said yourself you've spent 5 minutes… spend a little more.



List your problems, and you'll probably find the solution isn't all that difficult.



Regarding KeyInput's isKeyDown() method, KeyInput.get().isKeyDown() is there… don't really understand your issue.

Paigan said:

I was using the .isKeyDown() method so far.

You can still use it: KeyInput.get().isKeyDown( yourkey )

Hehe, maybe i appeared a little het up. Didn't want that :slight_smile:

It's still a little problematic for me to describe a intricate issue exactly the way i want to in english…





My problem is not, that i didn't find a solution after 5 minutes of searching. Would be foolish, of course.



I meant i only "scratched on the surface" (can you say that in english, too?) of dealing with the unofficial changes and already got kind of lost.





My problem consisted of two things:

  1. The Input thing i described:



    "getKeyBindingManager().getKeyInput()" does not work any more. And i found no other way of getting a KeyInput object in my application. So i thought i have no runtime instance of KeyInput from where i could call .isKeyDown().

    Thought all this would be moved to the controller stuff and that would be still under development or so…



    Okay now you showed me that i can simply call "KeyInput.get().isKeyDown()" and that problem is solved.

    (Pheew :slight_smile:




  2. The impression that more things are in work-over and constant change than it would be worth to adapt to.

    Probably that was wrong. That's why i wrote "or am i exaggerating?"









    So anyway:

    thanks for the help on the concrete problem.

    And "no offense meant" to the rest. Blame it on the language barrier :smiley: