Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

onscreen keyboard  RSS feed

 
rubel ahmed
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to build on-screen keyboard with java.But I don't know how to manage keyboard from java application.please help me.
 
Campbell Ritchie
Sheriff
Posts: 53769
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch
Sounds like a Swing question.
You will have to add Listeners to each key which add the character to a StringBuilder. Probably best to have your keyboard as a secondary window from another Swing application, which passes the StringBuilder to the keyboard and uses its contents.
You are going to have to find some way to send an Event to the parent app whenever "enter" is clicked.
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please note that this onscreen keyboard will only be available for the application of which the keyboard is part. If you want to send the key presses to another application you will need native code (JNI).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!