0

I'm trying to implement numpad in PyQt5 and Windows 10. There are buttons 1, 2, ... 9, enter

I'd like to implement the following event:

When user clicks for example on button 1, the character '1' will be sent to background application (for example notepad).

I have done simple GUI. I only need to implement this event. What libraries, functions can I use to this purpose?

xralf
  • 3,312
  • 45
  • 129
  • 200

1 Answers1

1

You should research how Inter-process communication works and APIs.

You did not specify which Operating System you target, each one has its own ways to do it.
You mention "sending characters to notepad" but which application do you plan to communicate with ? Because working with any application may be a very difficult problem.

For Notepad I found this question that uses the Windows API to communicate, but it was relatively easy because the source language was C# (which is well-integrated with Windows). According to this other question you should use PyWin32 to do that in Python.

But if you plan your NumPad application to work with many other applications, you should look how other Input sofwares work. It may have clues how to do it.

Lenormju
  • 4,078
  • 2
  • 8
  • 22