Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating and firing keyevent from action event on textfield

Sabitha Somesula
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My virtual keyboard have buttons to represent keys in keyboard. On button pressed action event is generated. To type some text in text field using virtual key board , changed all action events of each button pressed to key events and doing fireevent on textfield. But no text is seen in textfield. Not understanding what's happening with firevent. When printing keyevent code getting right code.

public void handle(ActionEvent event) {

KeyEvent keyEvent = KeyEvent.impl_keyEvent(textField, KeyCode.valueOf(name).impl_getChar(), name, KeyCode.valueOf(name).impl_getCode(), false, false, false, false, new EventType<KeyEvent>());

KeyCode code = keyEvent.getCode();
System.out.println("code : " + code);


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic