How do I bind a non-breakspace(alt-288 or &#160;) upon pressing the space bar in javascript?
<p>I'm using OpenMRS, it's an opensource medical records system.  OpenMRS has a built-in html editor and I use this mostly in javascripting ang building the forms.  In one of my forms,I have a textarea.  My client would like his entries(in paragraph or in list) to be indented in the textarea.  </p>

<p>Now when you try indenting the paragraph in the textarea then save the changes and preview the form, the paragraph becomes justified instead of retaining the indented lines.</p>

<p>However, if I try indenting the paragraph using ascii code for non-break space by typing <code>&amp;#160;</code> or pressing <code>alt-288</code>, the paragraph becomes indented thus giving me the desired result. Now, the users don't prefer typing or pressing ascii equivalents coz that'll be hassle on their part.</p>

<p>I'm using mostly javascript and jQuery because it's what openmrs supports.  If I could somehow bind the non-break space character upon pressing a key then this will work, but I'm at a lost here.  How will I do this in javascript or jquery?</p>
