How to display only one key if i hold the key down in the textarea
<p>Is There any possible way to display only one character when a key is pressed <strong>DOWN</strong> for a longer period of time what I mean is when I press lets say 's' <strong>DOWN</strong> for a longer period of time I want only 's' displayed and I don't want this to happen 'ssssssssssssssssssssssssssssssssssssssss....' . </p>

<p>And whit out using this method because this brings on the problem that if a user types fast and presses two keys at the same time only the second one will get displayed for example if I press down 'k' and press down whit out letting 'k' go the 'p' only the 'p' will get displayed. </p>

<pre><code>var textarea='';

document.getElementById('textareaID').onkeydown=keydown;
document.getElementById('textareaID').onkeyup=keyup;

function keydown () {

this.value=textarea;

}

function keyup () {
textarea=this.value;
this.value=textarea;

}
</code></pre>

<p>And please do not say using counters because it doesn't work for some reason believe me I have tried for the last 3 days.</p>

<p><a href="http://toki-woki.net/lab/long-press/" rel="nofollow">http://toki-woki.net/lab/long-press/</a> this is what i am basically trying to do but I cant understand how the part where you hold the key down and only one is displayed out is done and of course if i press a key and while the key is down i press another one both of them get displayed rest is easy.</p>

<p>So i would love and explanation its driving me crazy.</p>
