Sponsors: Michael Fertik - Best JAVA Web hosting Company & 30% off


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-09-2010, 05:04 PM
Member
 
Join Date: Feb 2010
Posts: 3
Rep Power: 0
ramyal is on a distinguished road
Question Send Keystrokes from Java to Notepad
I'm trying to develop a virtual keyboard to be used with text editors for spastic children. I use the Runtime class and exec method to spawn notepad. After spawning the process i need to send keystrokes to the notepad process. i.e., on click of a button in java frame, i need the corresponding char to be printed on the notepad. I tried using Robot in Java, but sends keystroke to window on top only.

Can i send the keystrokes only to the process i want using Robot or any other method in JAVA?

I tried to use frame.setvisible(false) and send the keystroke n then again making the frame visible... but the flicker is obvious and sometimes it doesn't send the keystroke to notepad.

Instead of changing focus is there any other way to send the keystroke to notepad process?

Awaiting your responses..

Thanks
Ramya
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 02-09-2010, 05:52 PM
Senior Member
 
Join Date: Sep 2008
Location: Voorschoten, the Netherlands
Posts: 3,337
Rep Power: 5
JosAH is on a distinguished road
Default
Doesn't the Java Accessibility Framework help?

kind regards,

Jos
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 02-12-2010, 09:08 AM
Member
 
Join Date: Feb 2010
Posts: 3
Rep Power: 0
ramyal is on a distinguished road
Default
thanks jos bout that information... but i've developed my frame based GUI already and i'm new to theis javax accessebility classes n not sure how to use them. so my main concern to send the keystroke from my java app to the notepad process that i spawn!! how can it be done?

Regards
Ramya
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 02-18-2010, 06:09 PM
Member
 
Join Date: Feb 2010
Posts: 3
Rep Power: 0
ramyal is on a distinguished road
Default
I tried looking into Java Accessibility packages, but i need more time to learn them in detail... but i jus wanna know if there's any way to send the keystrokes only to the selected / particular process dynamically using Robot??
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Tags
keystroke, process, robot

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
NotePad whosadork New To Java 10 10-03-2008 07:44 PM
Notepad or IDE? Eranga Other IDEs 30 09-22-2008 04:20 AM
Send keystrokes to iframe nloding New To Java 3 08-29-2008 05:06 PM
Showing how to add Actions for KeyStrokes Java Tip javax.swing 0 04-23-2008 08:17 PM
Creating a notepad application with java Daniel AWT / Swing 2 07-02-2007 05:18 PM


Java Forums is supported by the best jsp hosting.

All times are GMT +2. The time now is 05:04 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org