$(document).ready(function() {
$('input').on('keydown', function(e) {
if (this.value == '') {
var char = String.fromCharCode(e.which);
if (char.match(/^\w$/)) {
// If is empty and we pressed a printable key...
this.value = char.toUpperCase();
return false;
}
}
});
});