• Post Reply Bookmark Topic Watch Topic
  • New Topic

Firing KeyEvent for Backspace issue.

 
Jeremy Maddera
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok here is the issue the code below works in java 1.5 but not in java 1.4 or below. Does anyone know of any workarounds to get this working in 1.4?
I am wanting to fire a backspace keyevent by having the user push a button on the screen



Thanks in advance,

Jeremy
 
Alan Moore
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try generating a control-H event instead.
 
Jeremy Maddera
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No dice on the Control-H. It does send the KeyEvent because I do get some output to the KeyListener registered with the component. I use the Keyboard and get the same key codes as I do with I programmably genterate the key event. But it only works when I do use the keyboard....

Thanks for the help,

Jeremy
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you intend to simulate key being held down you probably need a corresponding KEY_RELEASED event.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!