huydq92 / hackerskeyboard

Automatically exported from code.google.com/p/hackerskeyboard
0 stars 0 forks source link

auto spacing of punctuation #202

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Double space at end of word
2. Select a punctuation from top suggestions 
3.

What is the expected behavior? 
<lastword><.><space>, where <.> is almost any selected punction.
Some punctuation produces <lastword><space>,<.><space>

What version of Hacker's Keyboard are you using? (See "Debug" section at
the bottom of the app's Settings menu.)
1.31.1311 (can't copy/paste)

On what phone or tablet?
Sprint HTC EVO 4G

If applicable, does this affect the 4-row or 5-row layout, or both? Which
language(s)?
Different punctuation exhibits different results. <(> should have a leading 
<space>, but not a <)>. Please check all possible punctuation from both top 
line & extended <.> from keyboard 

Please provide any additional information below.

Original issue reported on code.google.com by data4u.jg@gmail.com on 4 Mar 2012 at 2:40

GoogleCodeExporter commented 9 years ago
In looking and typing more closely after my initial post, it appears that this 
fault has some inconsistencies and unpredictabilities in how the punctuation 
and space(s) are replaced. Initially, I expected a simple review of the code 
would solve this issue, but it appears there are more factors involved in which 
punctuation mark, in what context, get substituted with which space(s).

This issue applies to those punctuation marks in the upper banner following a 
space, but also those typed from the period on the keyboard.

Original comment by data4u.jg@gmail.com on 7 Mar 2012 at 7:33

GoogleCodeExporter commented 9 years ago
Yes, the code related to this is rather obscure, and I don't think I understand 
the way the original author intended it to work. My attempts to make changes in 
this area tended to break things, so I'm not too keen to poke at it further.

Original comment by Klaus.We...@gmail.com on 7 Mar 2012 at 7:17

GoogleCodeExporter commented 9 years ago
Would you be willing to send me this code and perhaps we can figure it out and 
fix it together?

Original comment by data4u.jg@gmail.com on 13 Mar 2012 at 10:32

GoogleCodeExporter commented 9 years ago
The source is online. Most of the logic is here, search for "AutoSpace": 
http://code.google.com/p/hackerskeyboard/source/browse/java/src/org/pocketworkst
ation/pckeyboard/LatinIME.java

Also see 
http://code.google.com/p/hackerskeyboard/source/browse/java/src/org/pocketworkst
ation/pckeyboard/TextEntryState.java which tracks input states.

Original comment by Klaus.We...@gmail.com on 14 Mar 2012 at 5:47