按键处理

2006-06-05 15:27:38 J2ME经验 Views(1332)

1.在系统的按键函数里面得到键值.
2.两个变量存储,一个single,一个repeat.
3.single在每次循环里面都清除.repeat在按键释放的时候才清除.
4.转换键值,在每次需要用的时候,调用按键转换函数,这样做的好处是减少清除按键的代码.

Comments

Leave a Comment

Name
Content
Verification Type the characters you see in the picture below