Q:

Navigate through form with arrow keys

I have a html form, which is created like a table (with rows and columns). Basically it looks like excel.
And now I would like to navigate just like in excel with the arrow keys. Is that possible?
<table>
  <tr>
      <td/>
      <td/>
  </tr>      
  <tr>
      <td/>
      <td/>
  </tr>
</table>

A:

Yes, it was easy, once I got your tips. This is my solution:
   var UP = 38;
    var DOWN = 40;
    var LEFT = 37;
    var RIGHT = 39;
    var TAB = 9;
    $('#tab-columns').on('keydown', 'input', function (event) {

        var $focused = $(':focus');
        var id = ($focused.parents("td").attr('id'));
        if (id.startsWith("field_")) {              
            idArr = id.replace("field_", "").split("_");
            row = Number(idArr[0]);
            col = Number(idArr[1]);

            newId = id;
            switch (event.which) {          
            case UP:
                newId = "field_"+(row-1)+"_"+col;
                break;
            case DOWN:
                newId = "field_"+(row+1)+"_"+col;
                break;
            case TAB:
            case RIGHT:
                newId = "field_"+row+"_"+(col+1);
                break;                  
            case LEFT:
                newId = "field_"+row+"_"+(col-1);
                break;
            default:
                // nothing
            }

            $("#"+newId).find("input").focus();
        }

