JavaScript: How to fire the keyboard button “Tab”

If I press the “Tab” key in my ui the cursor jumps to next input field. I also want to achieve this behavior with the Enter key. Is it possible to press the Tab key via Javascript?

    public void Enter(KeyboardEventArgs e)
    {
        if (e.Code == "Enter" || e.Code == "NumpadEnter")
        {
            //press tab 
        }
    }