Simple keypad on angular

Viewed 114

I want to make simple keypad that emits keyboard events to type in the selected input element the flowing scenario don't work for my it dispatches the event put don't write the number in the input

  const e = new KeyboardEvent('keypress', {
    bubbles: true,
    key: '1'
  });
  document.activeElement.dispatchEvent(e);
  event.preventDefault();

any suggestion to fix this issue or any alternative way to make simple keypad that Write in multiple input fields

This interface will be used via the touch screen only, so I need a keypad to enter the numbers
0 Answers
Related