<textarea id="txt"></textarea>
<script type="text/javascript">
document.getElementById('txt').onkeypress = function (e) {
e = e || window.event;
if (e.keyCode == 97) {
this.value += 'x';
e.preventDefault ? e.preventDefault() : e.returnValue = false;
}
}
</script>