# TLF text, eventlistener and line breaks

**URL:** <https://forum.kirupa.com/t/tlf-text-eventlistener-and-line-breaks/323033>\
**Category:** flash\
**Created:** [June 14, 2011, 5:03pm UTC](https://forum.kirupa.com/t/tlf-text-eventlistener-and-line-breaks/323033 "2011-06-14T17:03:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![McLucky](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@McLucky](https://forum.kirupa.com/u/McLucky)\
**Post date:** [June 14, 2011, 5:03pm UTC](https://forum.kirupa.com/t/tlf-text-eventlistener-and-line-breaks/323033/1 "2011-06-14T17:03:02Z")

</div>

Hi,

I just started using TLF text and it’s interesting. I have this issue however.  
I made an swf to demonstrate the problem and you can try it here:  
[http://megaswf.com/serve/1131617](http://megaswf.com/serve/1131617)

But this is the problem:  
I have an input textfield (type input) and output textfield (dynamic not selectable) and eventlisteners on the input fields. It seems like the TLF does not register the enter-key. Try it for yourself via the link above.

My code is:

```auto
txtInputClassic.addEventListener(KeyboardEvent.KEY_UP, fncUpdateClassic);
txtInputTLF.addEventListener(KeyboardEvent.KEY_UP, fncUpdateTLF);

function fncUpdateClassic(e:Event):void
{
    txtOutputClassic.text = txtInputClassic.text;
}

function fncUpdateTLF(e:Event):void
{
    txtOutputTLF.text = txtInputTLF.text;    
}

```

![](http://forum.kirupa.com/uploads/kirupa/6552/c31c7ce314f989a3.jpg)

![](http://i54.tinypic.com/3499k04.jpg)

Thanks for reading 🙂
