C++ Desktop App press button or key on keyboard

35 Views Asked by At

I`m trying to make a light Windows desktop app, to read the weight from the serial port.

There is a window with a button, that reads weight from the serial port when it is pressed. But I want to make two options - you can use a button or you can only press space bar on the keyboard and do the same thing, read weight from the serial port.

Is there any way to make my app listen for keypress or link space bar to my existing button?

0

There are 0 best solutions below