jQuery(document).ready(function($) {
  $('input#c').focus();
  $('samp.cmd').click(function () { 
    var cmd = $(this).text();
    $("input#c").val(cmd + " ").focus();
  });
});