Passando $(this) para função - forma 1

HTML

<table>
  <tr>
     <td><input type="text" name="campo1" data-id="1"></td>
     <td><input type="text" name="campo2" data-id="2"></td>
     <td><input type="text" name="campo3" data-id="3"></td>
  </tr>
</table>
<input type="text" id="resultado">

JavaScript

$("table").on("keypress", "input", function(){
   // tem que passar $(this) como parâmetro da função
   nome_funcao( $(this) );
});

function nome_funcao( elemento ){
    // imprime resultado
    $("#resultado").html( "Input - ID: "+elemento.data("id") );
}