• Post Reply Bookmark Topic Watch Topic
  • New Topic

key listeners..  RSS feed

 
Anas El-Abboud
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ,
i want to make a listener on keyboard,but it can listen on it even i hided the window or even i opened another program !
how i can ?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / AWT / SWT / JFace forum...
 
Pat Hays
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Anas,

The reason is that the component can receive the Keyevents, only when this component get focus. otherwise this comonent won't receive the Keyevents.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!