$("#asset_scan").bind("keydown", function (e) {
      /* We don't take tab index into account here */
      var ENTER = 13,
        TAB = 9,
        code;