@Override
public void actionPerformed(ActionEvent e)
{
for (VirtualKeyListener l : vkListener)
{
l.keyPressed(new VirtualKeyEvent(KeyboardButton.this, KeyEvent.KEY_PRESSED,
System.currentTimeMillis(), 0, keyCode, keyChar, 0));
l.keyReleased(new VirtualKeyEvent(KeyboardButton.this, KeyEvent.KEY_RELEASED,
System.currentTimeMillis(), 0, keyCode, keyChar, 0));
if (keyChar != KeyEvent.CHAR_UNDEFINED && keyCode != KeyEvent.VK_TAB
&& keyCode != KeyEvent.VK_ENTER)
l.keyTyped(new VirtualKeyEvent(KeyboardButton.this, KeyEvent.KEY_TYPED,
System.currentTimeMillis(), 0, KeyEvent.VK_UNDEFINED, keyChar));
}
}
});
}