0

So I'm working on my first website project using Angular. It works great on a computer, but not on a phone. I have numeric input fields that calls a function using the "keydown.tab" event handler:

<input [(ngModel)]="inputs[i]" (keydown.tab) = "valueEntry(i)>". 

You enter a number, press tab, a calculation is performed and the curser moves onto the next input.

So how would I do this same thing on a phone? The standard keyboard on my Samsung has a next button. So what would the event listener be for the next button on a virtual keyboard?

Thanks.

  • My testing pixel device keyboard doesn't have a next option on the virtual keyboard. That's handy on the Samsung keyboard.. If you go to https://keyjs.dev and hit the next button on the keyboard, does it return a usable keycode or come back as unindentified / undefined? – BillD Jan 31 '23 at 04:34
  • Check this [SO](https://stackoverflow.com/questions/53690973/change-behaviour-of-enter-key-in-a-phone-angular-5/53691367#53691367). May be can be util. – Eliseo Jan 31 '23 at 07:36

1 Answers1

0

What ended up working for me is the (change) event:

<input [(ngModel)]="inputs[i]" (change) = "valueEntry(i)>"