'Automatic pressing of the key on the keyboard when the button on the interface is pressed

When the user presses the button on the interface, I want the 1 button to be pressed automatically, how can I do that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source