Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

media keyboard

Thread view: 
rmacnak@gmail.com - 04 Nov 2006 00:38 GMT
How do I receive input for pressing of the Play, Stop, Next, etc
buttons on my keyboard? (They don't seem to be in
java.awt.event.KeyEvent).

Thanks,
Ryan
Manish Pandit - 04 Nov 2006 04:22 GMT
> How do I receive input for pressing of the Play, Stop, Next, etc
> buttons on my keyboard? (They don't seem to be in
> java.awt.event.KeyEvent).
>
> Thanks,
> Ryan

IMO, these buttons are non-standard - hence not supported by java.

-cheers,
Manish
Andrew Thompson - 04 Nov 2006 04:28 GMT
> How do I receive input for pressing of the Play, Stop, Next, etc
> buttons on my keyboard? (They don't seem to be in
> java.awt.event.KeyEvent).

This simple source indicates there is no keyboard
event sent for the play/stop/next/previous keys of my
'Genius'* media aware keyboard.

* (shrugs vaguely) I think they are out of Taiwan,
it was $25 at Woolies.

<sscce>
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

class ListenType extends JFrame implements KeyListener {

 ListenType() {
   setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
   setSize(400,400);
   JTextArea lbl = new JTextArea("Hi!");
   lbl.addKeyListener(this);
   getContentPane().add( lbl );
 }

 public static void main(String[] args) {
   ListenType lt = new ListenType();
   lt.setVisible(true);
 }

 public void keyReleased(KeyEvent ke) {}

 public void keyPressed(KeyEvent ke) {}

 public void keyTyped(KeyEvent ke) {
   System.out.println( ke.toString() );
 }
}
</sscce>

..so - JNI?

Andrew T.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.