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.
我在 j2me 中比较新鲜。我喜欢实现一个应该检测 S40 设备的中心键的应用程序。我使用这个代码
if(keyCode==-5&&c==2) { c=1; repaint(); } else { c=2; repaint(); }
它只能在模拟器上工作,但不能在 S40 设备上工作。有谁知道如何解决这个问题。
这是诺基亚 s40 手机的关键代码,
-1 = UP -2 = DOWN -3 = LEFT -4 = RIGHT -5 = CK
有关更多信息,请参阅本文Canvas KeyCodes。