Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (710)
Games in Android Showcase (212)
games submitted by our members
Games in WIP (784)
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 1662 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,
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,
Offline endolf

JGO Coder

Medals: 7
Exp: 15 years

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.



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

theagentd (103 views)
2017-02-18 13:42:33

theagentd (107 views)
2017-02-18 13:35:16

h.pernpeintner (1272 views)
2017-01-24 22:39:11

h.pernpeintner (1260 views)
2017-01-24 22:38:32

Galdo (1819 views)
2017-01-12 13:44:09

Archive (1924 views)
2017-01-02 05:31:41

0AndrewShepherd0 (2462 views)
2016-12-16 03:58:39

0AndrewShepherd0 (2300 views)
2016-12-15 21:50:57

Lunch (2379 views)
2016-12-06 16:01:40

ral0r2 (2155 views)
2016-11-23 16:08:26
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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!