Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Keyboard component containing only Sleep button  (Read 1263 times)
0 Members and 1 Guest are viewing this topic.
Offline laginimaineb

Senior Newbie





« Posted 2007-10-04 09:48:19 »

Hello again, sorry to post another stupid question, however, I can't find a way around this... I have a Component representing my keyboard, and every 20 milliseconds I poll it, get all of it's components, and display their name. Problem is, the only component ever to appear is my sleep button? What should I do?

Lots of thanks,
laginimaineb.
Offline laginimaineb

Senior Newbie





« Reply #1 - Posted 2007-10-04 15:34:33 »

Me again... I just checked the test that came with the lastest version bundle and to my surprise it shows that I have 5 devices; two keyboards which only contain my Power and Sleep buttons, one real keyboard, one real mouse, and one "fake" mouse which only says : "Macintosh Mouse Emulation". Why is that so? I only have a normal mouse and keyboard (non-USB). How should I be able to select the "real" keyboard programmatically without asking the user to manually pick the device with the most buttons?

With thanks,
laginimaineb.
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #2 - Posted 2007-10-04 18:05:54 »

The extra devices, with just a few, non standard buttons is a 'delight' of the way the things are exposed in linux, one of them is the sleep button on your PC base i think (or support for it). Hit the power button on you ATX case and see it change (never tried it myself though). Some might be part of your keyboard, but I can't prove at run time, which actual piece of hardware they belong to, so I don't do anything clever, I just present what the udev offers me.

The mac emulation mouse is an optional kernel support for emulating more than 1 button on a single button mac mouse. It's up the the maintainers of your distribution to enable or disable that support in the kernel, or you can if you want to compile your own. It's a virtual device. It makes life interesting, but there is not alot I can do about it. I'm certainly not going to ignore it, because someone out there might want to use it Smiley.

HTH

Endolf

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (21 views)
2014-09-12 09:08:26

Norakomi (55 views)
2014-09-10 13:57:51

TehJavaDev (66 views)
2014-09-10 06:39:09

Tekkerue (33 views)
2014-09-09 02:24:56

mitcheeb (54 views)
2014-09-08 06:06:29

BurntPizza (38 views)
2014-09-07 01:13:42

Longarmx (24 views)
2014-09-07 01:12:14

Longarmx (30 views)
2014-09-07 01:11:22

Longarmx (28 views)
2014-09-07 01:10:19

mitcheeb (37 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!