【发布时间】:2015-08-17 14:34:49
【问题描述】:
我正在尝试制作键盘...
int code = 29; // Key code constant: 'A' key. Constant Value: 29 (0x0000001d)
KeyEvent k = new KeyEvent(KeyEvent.ACTION_UP, code);
InputConnection ic = getCurrentInputConnection();
ic.sendKeyEvent(k);
此代码很好地向应用程序发送字母“A”,因为它与代码“29”相关联,从这里http://developer.android.com/reference/android/view/KeyEvent.html
但是如果我想使用 unicode 字符,我该怎么办,比如这里
http://en.wikipedia.org/wiki/List_of_Unicode_characters
【问题讨论】:
-
ic.commitText("ПРЕВЕД МЕДВЕД", 0);
标签: android