在为 android 编写输入法编辑器时,除了更改 android:keyLabel 之外,我需要做什么才能使其映射接受一些 unicode 字符作为输入(例如,让我将马拉雅拉姆语字符映射为输入:0D00 - 0DFF)
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:horizontalGap="0px"
android:keyHeight="@dimen/key_height"
android:keyWidth="10%p"
android:verticalGap="0px" >
<Row>
<Key
android:codes="45"
android:keyEdgeFlags="left"
android:keyLabel="q"
android:popupCharacters="@string/hello"
android:popupKeyboard="@xml/qwerty"/>
<Key
android:codes="51"
android:keyLabel="w" />
<Key
android:codes="33"
android:keyLabel="e" />
<Key
android:codes="46"
android:keyLabel="r" />
<Key
android:codes="48"
android:keyLabel="t" />
<Key
android:codes="53"
android:keyLabel="y" />
<Key
android:codes="49"
android:keyLabel="u" />
<Key
android:codes="37"
android:keyLabel="i" />
<Key
android:codes="43"
android:keyLabel="o" />
<Key
android:codes="44"
android:keyEdgeFlags="right"
android:keyLabel="p" />
</Row>
<Row>
<Key
android:codes="29"
android:horizontalGap="5%p"
android:keyEdgeFlags="left"
android:keyLabel="a" />
<Key
android:codes="47"
android:keyLabel="s" />
<Key
android:codes="32"
android:keyLabel="d" />
<Key
android:codes="34"
android:keyLabel="f" />
<Key
android:codes="35"
android:keyLabel="g" />
<Key
android:codes="36"
android:keyLabel="h" />
<Key
android:codes="38"
android:keyLabel="J" />
<Key
android:codes="49"
android:keyLabel="K" />
<Key
android:codes="40"
android:keyEdgeFlags="right"
android:keyLabel="l" />
</Row>
<Row>
<Key
android:codes="60"
android:keyEdgeFlags="left"
android:keyIcon="@drawable/sym_keyboard_shift"
android:iconPreview="@drawable/sym_keyboard_shift"
android:isModifier="true"
android:isSticky="true"
android:keyWidth="15%p"
android:keyLabel="shift" />
<Key
android:codes="54"
android:keyLabel="z" />
<Key
android:codes="52"
android:keyLabel="x" />
<Key
android:codes="31"
android:keyLabel="c" />
<Key
android:codes="50"
android:keyLabel="v" />
<Key
android:codes="30"
android:keyLabel="b" />
<Key
android:codes="42"
android:keyLabel="n" />
<Key
android:codes="41"
android:keyLabel="m" />
<Key
android:codes="67"
android:isRepeatable="true"
android:keyEdgeFlags="right"
android:keyIcon="@drawable/sym_keyboard_delete"
android:keyWidth="15%p" />
</Row>
<Row android:rowEdgeFlags="bottom" >
<Key
android:codes="-3"
android:keyEdgeFlags="left"
android:keyIcon="@drawable/sym_keyboard_done"
android:keyWidth="20%p" />
<Key
android:codes="-2"
android:keyLabel="123"
android:keyWidth="15%p" />
<Key
android:codes="62"
android:isRepeatable="true"
android:keyIcon="@drawable/sym_keyboard_space"
android:keyWidth="30%p" />
<Key
android:codes="46,55"
android:keyLabel=". ,"
android:keyWidth="15%p" />
<Key
android:codes="10"
android:keyEdgeFlags="right"
android:keyIcon="@drawable/sym_keyboard_return"
android:keyWidth="20%p" />
</Row>
</Keyboard>