Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  catching operating system events  (Read 1536 times)
0 Members and 2 Guests are viewing this topic.
Offline Serethos

Sr. Member
**

Posts: 302


Java games rock!


« on: 2003-11-16 09:51:19 »

is there any way to catch the input (mouse/keyboard) events of the operating system (in my case win) within my application ?
Offline endolf
« League of Dukes »

JGO Kernel
*****

Posts: 1596
Medals: 2


Current project release date: sometime in 3003


« Reply #1 on: 2003-11-16 12:49:27 »

Hi
 Two options, the AWT events, keyboard/mouse listener, or by registering an AWTEventListener with the ToolKit. The other option for gamepads/joysticks etc to to try JInput

HTH

Endolf

Offline Serethos

Sr. Member
**

Posts: 302


Java games rock!


« Reply #2 on: 2003-11-16 14:42:03 »

hmm, i know the listener. but i have to add them to a frame, window or a container. but to whom do i add my listener if i want  to get the events, which occur e.g. on the win-desktop ?
Games published by our own members! Go get 'em!
Offline endolf
« League of Dukes »

JGO Kernel
*****

Posts: 1596
Medals: 2


Current project release date: sometime in 3003


« Reply #3 on: 2003-11-16 15:04:15 »

Hi
 You shouldn't really be doing it, but the Toolkit methods allow you to get system wide events under windows, and if they don't, the JInput definitly does

HTH

Endolf

Offline swpalmer

JGO Kernel
*****

Posts: 3438
Medals: 4


Where's the Kaboom?


« Reply #4 on: 2003-11-16 16:05:08 »

Quote
the Toolkit methods allow you to get system wide events under windows, and if they don't,


I think the ToolKit events are only Process wide.

Offline endolf
« League of Dukes »

JGO Kernel
*****

Posts: 1596
Medals: 2


Current project release date: sometime in 3003


« Reply #5 on: 2003-11-16 23:42:01 »

Quote


I think the ToolKit events are only Process wide.

That would make sence to me.
JInput on the other hand captures system wide, you don't even *need* a window, let along one thats in focus, this is true on windows and linux, not sure about osX though.

Endolf

Offline swpalmer

JGO Kernel
*****

Posts: 3438
Medals: 4


Where's the Kaboom?


« Reply #6 on: 2003-11-17 22:18:46 »

Same on OS X

Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.09 seconds with 19 queries.