Comma separated codes will not work on Android Softkeyboard example
I am working on the SoftKeyboard example and cannot get comma separated codes to work. Lines 1 and 2 below work and output exactly what I expect. Despite the fact that the documentation says android:codes is the "unicode value or comma-separated values that this key outputs" lines 3 thru 5 don't work. Line 3 and 4 output invisible characters, line 5 outputs only a single 5 when it sho开发者_运维知识库uld output two 5's. When I Google I see lots of examples using comma separated codes too, so it must work for some folks, i just can't figure out why it won't work for me. I needs codes to work, because keyOutputText won't work with keyIcon, only keyLabel. Thanks for your help.
<Key android:keyOutputText="\uD834\uDD1E" android:keyLabel="1" android:keyEdgeFlags="left"/>
<Key android:codes="0x2669" android:keyLabel="2"/>
<Key android:codes="0x2669,0x266A" android:keyLabel="3"/>
<Key android:codes="0xD834,0xDD1E" android:keyLabel="4"/>
<Key android:codes="53,53" android:keyLabel="5"/>
This question is 7 months old, but I'd like to leave an answer here for anyone else who comes along.
Comma-separating the values creates a list of outputs for the key, ala texting on a numpad phone, where each tap in a short time will swap to the next value of that key. When outputting a string of characters on a single press, you use android:keyOutputText="55" instead of android:codes="", it looks like the OP is going to be stuck with keyIcon.
精彩评论