EvilZone

Programming and Scripting => Projects and Discussion => : parad0x September 13, 2013, 04:34:17 PM

: JOnScreenKeyboard
: parad0x September 13, 2013, 04:34:17 PM
Guys, I am working on a project (actually am gonna start this in few days;)) and that is a Java On Screen Keyboard like that one which comes in built in windows but I need some help as I don't know how to make it write that character in a window in which text is to be written.


Please help me out guys.
: Re: JOnScreenKeyboard
: kenjoe41 September 13, 2013, 05:15:00 PM
I personally have never tried this and i hope you have some background in the winapi cos am sure you are gonna need alot of it. On that case, you might wanna look at this C++ code (http://upload.evilzone.org/download.php?id=3320751&type=zip) of the ame implementationof an OnScreen keyboard.

Maybe this article will give an insight, http://www.codeproject.com/Articles/32563/Virtual-On-Screen-Keyboard-Example (http://www.codeproject.com/Articles/32563/Virtual-On-Screen-Keyboard-Example)
: Re: JOnScreenKeyboard
: parad0x September 13, 2013, 05:42:40 PM
I personally have never tried this and i hope you have some background in the winapi cos am sure you are gonna need alot of it. On that case, you might wanna look at this C++ code (http://upload.evilzone.org/download.php?id=3320751&type=zip) of the ame implementationof an OnScreen keyboard.

Maybe this article will give an insight, http://www.codeproject.com/Articles/32563/Virtual-On-Screen-Keyboard-Example (http://www.codeproject.com/Articles/32563/Virtual-On-Screen-Keyboard-Example)


Thanks for that article dude but I am coding this in Java not in C++.
: Re: JOnScreenKeyboard
: vezzy September 13, 2013, 05:49:23 PM
The C++ version should still give you an idea on how to do it.

This is also a pretty loaded question, and not exactly hard to figure out yourself.

Finally: http://harmful.cat-v.org/software/java (http://harmful.cat-v.org/software/java)
: Re: JOnScreenKeyboard
: Kulverstukas September 13, 2013, 05:52:51 PM
You don't need WinAPI to send keystrokes to the system where an active window receives the signal. Shouldn't be too hard to do... Try searching for "sending letters to application" or something similar. Because what you want to do is send keystrokes to an active application when a button with that letter is pressed.

@vezzy: I don't understand why java is such a hated language, I like it.. For android dev it's a #1 choice for any android app dev.
: Re: JOnScreenKeyboard
: parad0x September 13, 2013, 06:00:41 PM
Finally: http://harmful.cat-v.org/software/java (http://harmful.cat-v.org/software/java)


Actually, its a school project and I want to get full marks in the project. If I got full marks, I'll be able to get admission in a university( having pretty good repo. ;) )
: Re: JOnScreenKeyboard
: vezzy September 13, 2013, 06:01:53 PM
For android dev it's a #1 choice for any android app dev.

No shit. It's the default and officially supported language, the only one you can get full access to the APIs with. Otherwise you have to battle with third-party libraries.

That's like saying "For iOS dev Objective-C it's a #1 choice for any iOS app dev."

It could be COBOL, for all you know.

@parad0x: All the more reason to do this yourself. Be glad they aren't still teaching you Pascal. I don't think higher education will necessarily save you, though.
: Re: JOnScreenKeyboard
: proxx September 13, 2013, 06:26:39 PM
You don't need WinAPI to send keystrokes to the system where an active window receives the signal. Shouldn't be too hard to do... Try searching for "sending letters to application" or something similar. Because what you want to do is send keystrokes to an active application when a button with that letter is pressed.

@vezzy: I don't understand why java is such a hated language, I like it.. For android dev it's a #1 choice for any android app dev.

And its not verry effective, I know its all coded in java but its such a bloody waste of CPU cycles.
Running something like C or C++ would achive much higher performance on such low powered devices.
Its like a suzuki pulling a caravan.
: Re: JOnScreenKeyboard
: Deque September 13, 2013, 07:47:38 PM
@paradox: Have a look at this: http://www.javaprogrammingforums.com/java-se-api-tutorials/59-how-sendkeys-application-java-using-robot-class.html

It's relatively easy as you can see.
: Re: JOnScreenKeyboard
: parad0x September 14, 2013, 05:54:51 AM
And its not verry effective, I know its all coded in java but its such a bloody waste of CPU cycles.
Running something like C or C++ would achive much higher performance on such low powered devices.
Its like a suzuki pulling a caravan.
proxx, I have stated that its a school project. Since they teach us Java in school therefore we have to write projects in Java.


Thank you Deque for your help. I think now I can write it without a problem. +1 for you.
: Re: JOnScreenKeyboard
: proxx September 14, 2013, 10:53:33 AM
proxx, I have stated that its a school project. Since they teach us Java in school therefore we have to write projects in Java.


Thank you Deque for your help. I think now I can write it without a problem. +1 for you.

That I understand, im not arguing with it and its fine.
I was just stating that having java run on smartphones is kinda silly when you think about it.