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.
比如一些神奇的功能
public String function(int key) {}
以便
function(KeyEvent.VK_A)会回来"A"
function(KeyEvent.VK_A)
"A"
function(KeyEvent.VK_DOWN)会回来"DOWN"
function(KeyEvent.VK_DOWN)
"DOWN"
function(KeyEvent.VK_COMMA)会回来"COMMA"
function(KeyEvent.VK_COMMA)
"COMMA"
没关系...我发现public static String getKeyText(int keyCode)
public static String getKeyText(int keyCode)
您可以getKeyText(int keyCode)在您的KeyEvent
getKeyText(int keyCode)
KeyEvent