// HTML - Uncomment the next HTML block
// <input type="text"/>
// <br>
// <textarea rows="20" ></textarea>
// jQuery
var output = $('textarea');
$('input').keydown(function(e){
output.val(output.val() + "\n" + e.which + ' or ' + e.keyCode);
});
jQuery find which key was pressed. jsFiddle example: https://jsfiddle.net/t9b2bfcd/. Uncomment the HTML block to see the input and the textarea.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.