Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要的是:
a
'a'
65
有没有类似的东西已经可用?
您可以使用 onKeyDown 侦听器,默认情况下,它将键代码传递到事件处理程序。
public boolean onKeyDown(int keyCode, KeyEvent event) { Lod.d("ON KEY DOWN", "KEY CODE: " + keyCode); return super.onKeyDown(keyCode, event); }
请记住在此处返回一个值,因为事件处理程序需要返回类型为boolean。