How can key released (key listener) be implemented on codename one

277 views
Skip to first unread message

Caleb Nasio

unread,
Oct 13, 2014, 6:43:09 PM10/13/14
to codenameone...@googlegroups.com
IAm trying to implement an on key released event on codename one apparently it seems not to be included in its library. Is there a way/another way I can get to do this ? This java code will not work.

 protected void onMain_PostalCodeKeyReleased(Component c, KeyEvent event) {

        Dialog.show("WORK", "Hey", "OK", null);

    }

Shai Almog

unread,
Oct 13, 2014, 7:19:08 PM10/13/14
to codenameone...@googlegroups.com
Of course its included.
You can bind key listeners to the form or to derive it and override the key events.
You are discussing physical keys and not virtual keys though, right?

Caleb Nasio

unread,
Oct 13, 2014, 7:48:07 PM10/13/14
to codenameone...@googlegroups.com
Am creating an IOS app so I think that will be virtual keys.

Shai Almog

unread,
Oct 14, 2014, 7:31:38 AM10/14/14
to codenameone...@googlegroups.com
iOS doesn't support that. The virtual keyboard is attached to the text field on iOS so you will need to use the DataChangeListener to monitor changes as they happen to a text field.
Reply all
Reply to author
Forward
0 new messages