Jazter
Jazter

Reputation: 31

How to set the KeyListener for Canvas.KEY_NUM2 in CodeNameOne

I had this code in LWUIT, but now that I've migrated to CodeNameOne the Canvas class not have the constants KEY_NUM1, KEY_NUM2, etc. And I can't add the Key Listener.

form.addKeyListener (Canvas.KEY_NUM1, bListener);

Where can I find these constants in CodeNameOne?

Upvotes: 2

Views: 307

Answers (1)

Shai Almog
Shai Almog

Reputation: 52770

Just use '0' instead of the num1 constant.

Upvotes: 4

Related Questions