Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,732,206 Members 43,502 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
cherylbaker
Old
#11  
Senior Member
Thanks Meter 194
Posts: 1,245
Join Date: Jan 2006
Quote:
Originally Posted by eclipxe View Post
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: [ Click to Expand ]
 
lehoi79
Old
#12  
Member
Thanks Meter 6
Posts: 64
Join Date: Mar 2010
Location: VA
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
 
eclipxe
Old
#13  
Member - OP
Thanks Meter 84
Posts: 68
Join Date: Jan 2007
Quote:
Originally Posted by lehoi79 View Post
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: [ Click to Expand ]
 
vwgti18
Old
(Last edited by vwgti18; 11th January 2013 at 10:07 PM.)
#14  
vwgti18's Avatar
Senior Member
Thanks Meter 42
Posts: 236
Join Date: Apr 2011
Location: Sacramento
Quote:
Originally Posted by eclipxe View Post
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
 
lehoi79
Old
#15  
Member
Thanks Meter 6
Posts: 64
Join Date: Mar 2010
Location: VA
Quote:
Originally Posted by eclipxe View Post
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
 
eclipxe
Old
#16  
Member - OP
Thanks Meter 84
Posts: 68
Join Date: 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: [ Click to Expand ]
 
vwgti18
Old
#17  
vwgti18's Avatar
Senior Member
Thanks Meter 42
Posts: 236
Join Date: Apr 2011
Location: Sacramento
Quote:
Originally Posted by eclipxe View Post
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
 
brooon
Old
#18  
brooon's Avatar
Senior Member
Thanks Meter 138
Posts: 748
Join Date: May 2009
Quote:
Originally Posted by eclipxe View Post
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)...
 
unslav3d
Old
#19  
unslav3d's Avatar
Senior Member
Thanks Meter 24
Posts: 112
Join Date: Jul 2011
Location: bayonne
can we possibly get a dpi 240 version? pllllzzzzz? lol
 
lehoi79
Old
(Last edited by lehoi79; 12th January 2013 at 06:01 AM.)
#20  
Member
Thanks Meter 6
Posts: 64
Join Date: Mar 2010
Location: VA
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

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

Advanced Search
Display Modes