|
 |
|
08-19-2004, 10:28 PM
|
#1
|
|
Variable Bitrate
Join Date: Jun 2004
Location: Sydney, Australia
Posts: 273
|
Phone style text input applet (with Source code!)
Hi guys,
for all of those not fortunate enough to have touch screens, i have written this little app to allow text input using a numpad the same way you would enter text on an SMS.
I tried out the Girder 'Nokia Style Input' layout, but it wasnt very usable!, so here is my offering. You need to use Girder, and in there you assign one of the Numpad keys to launch my applet ('/' or '*', or if you have any extra keys around the numpad they would be cool). Then Assign another key to perform a Paste operation (Ctrl+V)
Now, it all works like this: In your Media/GPS app you come across a field that requires text input. When the cursor is on the field press the key you assigned to launch my applet. The input window pops up and you can enter the text just as you would on a phone:
Note that the numpad keys are mapped out as follows:
1 2 3
4 5 6
7 8 9
0
(to match the phone keypad)
1=punctuation
2=abc
3=def.. etc
0=Space
. (del) = Shift or Caps (once for single letter shift, twice for caps lock, again to cancel)
+ Cancels the timer (i.e. 'Accept this letter now') - useful for fast typing!
- deletes last char
When you are done typing your word, you hit 'Enter'. This will copy the current text to the clipboard, and close my applet.
Now you should be back in your original app, with the cursor still on the field you want to fill in. Just press the key you assigned to Paste, and Bingo, you have filled out your field!!!
Note that this is just a quick attempt, i am open to suggestions (one thing i plan to do is for it to read a text file to determine the key mappings instead of being hardcoded - so that you can add different mappings/characters for your language.
Developers please feel free to use/modify/do whatever with the source which i have included in the Zip file - perhaps you could embed it into your application! If it is useful to you, i wouldnt mind being credited somewhere in your app; but if you dont then its ok...
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
08-21-2004, 07:33 AM
|
#2
|
|
Raw Wave
Join Date: Jul 2003
Location: Spagcave, in da UK Today's phrase: J'aime Alizee
Posts: 1,716
|
Sounds good - now you just gotta code the T9 predictive text input...
|
|
|
08-21-2004, 09:22 AM
|
#3
|
|
Raw Wave
Join Date: Aug 2003
Location: Essex, England
Posts: 2,224
|
Dominik,
It looks good  It was something I was planning on implementing within AIMEE, so if it is OK with you, I will take a look at your code, and use it as a basis for this section in AIMEE
Regards,
Garry
|
|
|
08-22-2004, 07:29 AM
|
#4
|
|
Variable Bitrate
Join Date: Jun 2004
Location: Sydney, Australia
Posts: 273
|
Confused, i actually saw your post in a previous thread, which is what got me started.
The code would be easy to adapt to any VB text field, you just need to have a flag which would lock the field (to stop the numbers coming up on the field!!), and process the Keypress Event.
T9 is coming. Speed will be a huge issue with that; The dictionary file i have has about 188,000 words, and even if its indexed it will be a pig for long words...
|
|
|
08-22-2004, 08:46 AM
|
#5
|
|
Raw Wave
Join Date: Jul 2003
Location: Spagcave, in da UK Today's phrase: J'aime Alizee
Posts: 1,716
|
erm...I was just kiddin' about the T9!!!
But if you can implement it...
|
|
|
08-22-2004, 10:41 AM
|
#6
|
|
Variable Bitrate
Join Date: Jun 2004
Location: Sydney, Australia
Posts: 273
|
I have the program structure worked out (simple recursive function); Gimme about a week (I dont have VB at home, so the only time i can do it is while i dont have anything to do at work!)
|
|
|
08-22-2004, 11:18 PM
|
#7
|
|
SMKFree
Join Date: Aug 2003
Location: Chicago
Posts: 4,841
|
would be really cool if someone made an onscreen keyboard like this
I didnt download yet and try out, but do you have to use girder for this to work? Cant it just detect any number keys as phone style text? Or made to do so? I have a RF remote and it would be cool to use that to type with, without the help of girder.
Thanks
|
|
|
08-22-2004, 11:30 PM
|
#8
|
|
Raw Wave
Join Date: Jul 2003
Location: Spagcave, in da UK Today's phrase: J'aime Alizee
Posts: 1,716
|
Yeah would be pretty cool for phone control
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
08-23-2004, 12:16 AM
|
#9
|
|
Constant Bitrate
Join Date: Apr 2004
Location: Oklahoma
Posts: 123
|
I added onscreen buttons to his program. All they do is emulate within the program someone pressing 0-9, +, -, ., and enter.
It should be pretty self-explainatory. done is the same as pressing enter. Use is like pressing +, del is -, spc is 0, caps is .
If you have any questions about the onscreen buttons let me know.
|
|
|
08-23-2004, 02:47 AM
|
#10
|
|
Variable Bitrate
Join Date: Jun 2004
Location: Sydney, Australia
Posts: 273
|
Good Stuff Mookie! Didnt know if there was a use for the OSK, but now that you've done it, i like it!
You dont need Girder to run it, but to utilise it in your applications you need something that calls it up. Any automation tool will work, you just need to be able to call my program using a keystroke (or even an icon on the QuickLaunch area if you have a touchscreen). and also you need to be able to paste the results from the clipboard. Thats all i use Girder for.
Actually, if you have a half-decent numpad (one of those ones with some shortcut keys on the top), you could probably use the supplied software to program those shortcut keys to call my program, and paste the results.
If it gets integrated into a Media Player (Confused??  ) it would allow input into any field directly. But if you run any external apps, you would still want to be able to call it seperately...
If some really smart people started working on it i'm sure you could get it to update the fields directly without needing to paste. I actually started looking at making my own IME for XP based on this, but stopped after the first page of the 300 page instruction manual and realised it was beyond me...
|
|
|
08-23-2004, 05:42 PM
|
#11
|
|
Variable Bitrate
Join Date: Jul 2002
Location: Staffordshire - united kingdom
Posts: 363
|
i just programed up my media remote to numpad buttons in girder, and it works great, it has the lettering (abc, def) under the numbers too which is really cool. one more thing though, my remote has 2-ABC, 3-DEF etc, but on this prog its 8-abc, 9-def.
could this be reprogramable?
thanks,
tom.
|
|
|
08-23-2004, 05:59 PM
|
#12
|
|
Raw Wave
Join Date: Aug 2003
Location: Essex, England
Posts: 2,224
|
I will definitely be looking at this code within the next few days for integration into AIMEE  I have a PS2 numberpad sitting in my shed doing nothing that fits into my armrest perfectly, this will be an awesome addition to AIMEE and my car to get it done
Garry
|
|
|
08-23-2004, 06:04 PM
|
#13
|
|
Newbie
Join Date: Aug 2004
Location: Reading, UK
Posts: 38
|
with the whole t9 thing in mind, how are you storing or planning on storing the dictionary file?
I was thinking that if you could store it in a tree then searching through the database would be quite quick as you can ignore a lot of words very easily by pruning every branch on the tree but the first letter typed and so on for each following letter.
I think thats how t9 works anyhow, just a thought
|
|
|
08-23-2004, 07:05 PM
|
#14
|
|
Variable Bitrate
Join Date: Jun 2004
Location: Sydney, Australia
Posts: 273
|
Thats an interesting thought Keegan. I was just going to store the words into 37 tables (1 letter per table, 0-9, and punctuation), and query the table. Then the resultset from that gets passed into the function recursively, so each function just takes unmatched words out until you reach the end of inputted characters, or until there are no more words (at which point i plan on calling the first input applet to let you spell the words!)
Actually, that kind of sounds like what you are talking about, doesnt it...
|
|
|
08-23-2004, 08:00 PM
|
#15
|
|
Variable Bitrate
Join Date: Jun 2004
Location: Sydney, Australia
Posts: 273
|
Slight modification: This version uses the keys as they are layed out (e.g. 1 = Punctuation, 2 = abc2, 3 = def3 etc
I'm still working on a version which is completely customisable (allow you to enter international characters into it, or change what the +, -, . keys do as well. But its got a bit busier here at work, so it might take a bit (really should get me a version of Visual Studio at home!)
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:51 AM.
| |