Post Reply

[MOD] Add auto-correct to Samsung Keyboard and shorten long-press delay

OP eclipxe

11th January 2013, 08:43 PM   |  #11  
Senior Member
Thanks Meter: 202
 
1,297 posts
Join Date:Joined: Jan 2006
Quote:
Originally Posted by eclipxe

I uploaded the APK - give it a try and let me know how it works for you guys. Open to suggestions. Also working on the patcher in case you wanted to customize it.

Awesome job. Seems to work well I guess. . Never understood the whole auto Correction. . But if it type rscue it will change it to rescue auto magically. .

Sent from my SPH-L900 using Xparent Purple Tapatalk 2
The Following User Says Thank You to cherylbaker For This Useful Post: [ View ]
11th January 2013, 09:23 PM   |  #12  
Member
Flag VA
Thanks Meter: 6
 
65 posts
Join Date:Joined: Mar 2010
More
failed to install for me... I guess it might be due to the fact that mine is ATT version. I wanna try this mod so bad though....

Sent from my SAMSUNG-SGH-I317 using Tapatalk 2
11th January 2013, 09:31 PM   |  #13  
OP Member
Thanks Meter: 84
 
68 posts
Join Date:Joined: Jan 2007
Quote:
Originally Posted by lehoi79

failed to install for me... I guess it might be due to the fact that mine is ATT version. I wanna try this mod so bad though....

Sent from my SAMSUNG-SGH-I317 using Tapatalk 2

Did you drop into /system/app then set permissions on it? Shouldn't need to actually install, just reboot.
The Following User Says Thank You to eclipxe For This Useful Post: [ View ]
11th January 2013, 09:58 PM   |  #14  
vwgti18's Avatar
Senior Member
Sacramento
Thanks Meter: 45
 
245 posts
Join Date:Joined: Apr 2011
More
Quote:
Originally Posted by eclipxe

Hey all, this is my first mod, but it was driving me crazy that the stock samsung keyboard didn't support auto-correct - and the timeout delay was way too long.

I'm working on an auto-patcher in the next couple of days.

EDIT:
I attached the APK: /system/app/
Make sure to set the proper permissions, then reboot.

The code changed is below

Here's a first stab at fixing both, would love some feedback.

1. To change the long press delay

In PointerTracker:
Code:
        ###################################################
# Change the long press delay to 200ms from 500ms #
###################################################
    .line 498
    const/16 v0, 0xc8

    .line 499
    .local v0, delay:I
    packed-switch p1, :pswitch_data_0

    .line 504
    const/16 v0, 0xc8

    .line 507
    :goto_0
    int-to-long v1, v0

    return-wide v1

    .line 501
    :pswitch_0
    const/16 v0, 0xc8
2. To add auto-correct

In SwiftkeyQwertyLatinInputModule
Code:
    .line 312
    :cond_3

##################################################
# Add support for auto-correct on word separator # 
##################################################
#check if the user has entered text
    iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mComposing:Ljava/lang/StringBuilder;
    invoke-virtual {v7}, Ljava/lang/StringBuilder;->length()I
    move-result v7
    if-lez v7, :cond_10

    iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mEngineManager:Lcom/diotek/ime/framework/engine/InputEngineManager;
    iget-object v8, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mComposing:Ljava/lang/StringBuilder;
    invoke-interface {v7, v8, v9}, Lcom/diotek/ime/framework/engine/InputEngineManager;->getCharSequence(Ljava/lang/StringBuilder;I)I
invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->updateSuggestion()V
invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->setComposingText()V
##################################################
# End support for auto-correct on word separator #
##################################################

   #move clearCandidateList from beginning of processWordSeparator to after we do correct
   :cond_10
    invoke-virtual {p0}, Lcom/diotek/ime/framework/input/SwiftkeyQwertyLatinInputModule;->clearCandidateList()V

   #code below is not changed - just for reference
    iget-object v7, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mEngineManager:Lcom/diotek/ime/framework/engine/InputEngineManager;

    iget-object v8, p0, Lcom/diotek/ime/framework/input/AbstractInputModule;->mCandidates:Ljava/util/ArrayList;

    invoke-interface {v7, v8}, Lcom/diotek/ime/framework/engine/InputEngineManager;->getSuggestion(Ljava/util/ArrayList;)I

    .line 313

Can u make the long press a lil shorter like 140ms ? And turn off the auto correct lol I can't type half the stuff I'm trying to. Is there a user dictionary?

Sent from my SPH-L900 using Tapatalk 2
Last edited by vwgti18; 11th January 2013 at 10:07 PM.
11th January 2013, 10:05 PM   |  #15  
Member
Flag VA
Thanks Meter: 6
 
65 posts
Join Date:Joined: Mar 2010
More
Quote:
Originally Posted by eclipxe

Did you drop into /system/app then set permissions on it? Shouldn't need to actually install, just reboot.

I guess I have to be rooted in order to do thissince this is a system app. I will try it tonight when I get home.

Thanks for the help.

Sent from my SAMSUNG-SGH-I317 using Tapatalk 2
11th January 2013, 10:06 PM   |  #16  
OP Member
Thanks Meter: 84
 
68 posts
Join Date:Joined: Jan 2007
Yes, the only problem is that under about 200ms, Swyping no longer works!
The Following User Says Thank You to eclipxe For This Useful Post: [ View ]
11th January 2013, 10:08 PM   |  #17  
vwgti18's Avatar
Senior Member
Sacramento
Thanks Meter: 45
 
245 posts
Join Date:Joined: Apr 2011
More
Quote:
Originally Posted by eclipxe

Yes, the only problem is that under about 200ms, Swyping no longer works!

Damn nvm then lol thanks tho

Sent from my SPH-L900 using Tapatalk 2
11th January 2013, 10:44 PM   |  #18  
brooon's Avatar
Senior Member
Thanks Meter: 138
 
754 posts
Join Date:Joined: May 2009
Quote:
Originally Posted by eclipxe

Did you drop into /system/app then set permissions on it? Shouldn't need to actually install, just reboot.

Write,read,read...is that correct? It doesnt work for me yet (crashes)...
12th January 2013, 12:47 AM   |  #19  
unslav3d's Avatar
Senior Member
Flag bayonne
Thanks Meter: 24
 
112 posts
Join Date:Joined: Jul 2011
More
can we possibly get a dpi 240 version? pllllzzzzz? lol
12th January 2013, 05:58 AM   |  #20  
Member
Flag VA
Thanks Meter: 6
 
65 posts
Join Date:Joined: Mar 2010
More
dropped the apk in the system/app, rebooted (wiped cache, delvik cache)... crashed at opening the keyboard.

Im on ATT 4.1.2 stock rooted.

do I need to be on deodex ROM?

Sent from my SAMSUNG-SGH-I317 using Tapatalk 2
Last edited by lehoi79; 12th January 2013 at 06:01 AM.

Post Reply Subscribe to Thread

Tags
keyboard, mod
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Sprint Galaxy Note II Themes and Apps by ThreadRank