我試圖讓鍵盤...Android的InputMethodService - 如何獲取unicode字符?
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); – Roger