Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (724)
Games in Android Showcase (216)
games submitted by our members
Games in WIP (790)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JInput / Re: Controller connection state not properly recognized on: 2011-05-10 02:05:54
While I've only been here shortly, and not in depth, I think that JInput not detecting if a controller was unplugged or plugged was a recurring problem. So far as I can tell (someone can correct me if I'm wrong) this thread has a solution with the last post also being a solution which no one has expanded on though.
2  Java Game APIs & Engines / JInput / Keyboards, Mice, and Focus on: 2011-05-01 04:57:12
I am new to Jinput and have just recently set up Jinput, class paths, and what not and I have a question.
I worked through the "Getting Started with JInput" topic and everything was working fine until I got to the section on reading in input from the controllers. I went ahead and typed out the code for polling the controllers, establishing an eventqueue, and reading events and the code did not seam to do anything. I would run it, and nothing. I set up a few debug statements listing the controller's names etc, a System.out.println if an event was triggered (to see if the StringBuffer was somehow empty), I messed around with administrator settings, and nothing seamed to work. I was about to give up, when I plugged in my old Axis Pad, and voila it was being detected!

I've searched these forums for an explanation and came about this thread:
I am writing these programs using the Netbeans 7.0 IDE, and it could be possible when the program executes there is no active window for the raw data to fetch keyboard and mouse events from (I should have mentioned above that the test program ran correctly).
As the above thread was from two years ago, I was wondering if any fix had been discovered in the meantime.

You see, my final project (and initial reason for installing JInput) requires detecting input from multiple mice and keyboards while out of focus. Why this is is that I bought Portal 2 recently, and was very disappointed that it did not have an "offline" multiplayer (playing split screen on one computer with a friend). Looking around the internet I found a workaround on the Steam forums, how one can launch the multiplayer maps directly from the console, and bind a joystick's keys to player two (after said joystick was emulated as a 360 controller).
I have also found and set up a way to play the game on two different monitors.

While this is all great, my controller is pretty old (3 of the 4 bumpers/triggers don't work) and playing with it on the more reaction based puzzles is very difficult. So I started looking for ways to detect multiple mice and keyboards, and then emulate a controller with them. One solution (GlovePIE) would require the computer to run in test mode as it used unsigned drivers to emulate controllers; another was outdated by 4-6 years. This makes JInput my best bet as it is still regularly updated and has a forum of awesome people (This would be you guys) working on it.

In short, is there a way to detect the input of multiple mice and keyboards without having an in-focus window, or is there a way to have a window and Portal 2 to share focus, or some other workaround?
Pages: [1]
buddyBro (195 views)
2017-04-05 03:38:00

CopyableCougar4 (625 views)
2017-03-24 15:39:42

theagentd (619 views)
2017-03-24 15:32:08

Rule (669 views)
2017-03-19 12:43:22

Rule (643 views)
2017-03-19 12:42:17

Rule (647 views)
2017-03-19 12:36:21

theagentd (659 views)
2017-03-16 05:07:07

theagentd (594 views)
2017-03-15 22:37:06

theagentd (433 views)
2017-03-15 22:32:18

theagentd (362 views)
2017-03-15 22:31:11
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!