younglo / cyanogenmod4milestone

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

Multipress fix for polish language #749

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What is the Mod-Version you are using?[Settings> About> Mod Version]
CyanogenMod-7.1.5-Milestone-KANG

What steps will reproduce the problem?
1. Set keyboard multipress language to polish
2. Double press 'z' key

What is the expected output? What do you see instead?
I expect to see letter 'ż' (U+017B) or 'Ż' (for U+017C) for capital letter, 
since that's the letter that is bound to 'z' with national key modifier (right 
alt or ~) on a PC keyboard.
Instead i see letter 'ź' (U+017A) or 'Ź' (u+0179). The expected letter (ż) 
is entered on the third press.
Both letters look similar but the latter 'ź' (U+017A) used rarely in polish 
language, while 'ż' (U+017B) is used more often.
Also, the 'ź' letter is traditionally bound to key 'x' with national char 
modifier of a PC keyboard: It looks similar to letter 'z' (but key 'z' is 
already used to enter the more common letter 'ż') and key 'x' happens to be 
right next to 'z' and isn't used for any national character.

So i suggest modifying core/java/android/text/method/QwertyKeyListener.java at 
line 213 to:
MP_SETS.put('Z', "\u017B\u0179");
line 221 to:
MP_SETS.put('z', "\u017C\u017A");
Which will change the order of characters entered by multipress so that the 
more frequently used letter will pop up first, and adding the following lines 
(therefore binding 'ź' to double press of 'x' key, like in PC keyboards):
MP_SETS.put('x', "\u017A");
MP_SETS.put('X', "\u0179");

Original issue reported on code.google.com by mr.deimos.84 on 9 Feb 2012 at 6:20

GoogleCodeExporter commented 8 years ago
Thanks for your suggestion. Though I tried to sort the multiple alternates by 
usage frequency in given language, I obviously failed in this case :) .
Fixed by this commit: 
https://github.com/nadlabak/android_frameworks_base/commit/58f423595975a98c1ca43
be8d86cb0fcb240933d

Original comment by kabal...@gmail.com on 9 Feb 2012 at 11:33