How to listen the keypress in the soft keyboard?

前端 未结 4 1316
耶瑟儿~
耶瑟儿~ 2020-12-06 18:11

I need a listener to identify the keypress in the soft keyboard/on screen keyboard.

I tried with addtextchangelistener textwatcher but this one give the good result

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-06 18:58

    When handling keyboard events with the KeyEvent class and related APIs, you should expect that such keyboard events come only from a hardware keyboard. You should never rely on receiving key events for any key on a soft input method (an on-screen keyboard).

    see: Handling Keyboard Actions

提交回复
热议问题