Click here to Skip to main content
15,035,723 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all fist sorry for bad English :) I have a problem in making a program with I need the program do this when I press (z) the program press (0) (Escape) (backspace) (enter) I know how to make it but! I must select my program to work I need it to work when I press (z) anywhere thanks :)
Sinisa Hajnal 3-Oct-14 2:12am
Just to clarify:
You need your program to read / intercept keypress within any process / program on the computer?

What happens when you press "z" in text editor? Should you get letter z or 0 which will be deleted immediately with backspace and newline?

I think you have to implement a keyboard global hook. Google helps[^].
An alternative to Global Hooks is to use Windows Raw Input API.
You can use this article as a starting point:
Using Raw Input from C# to handle multiple keyboards[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900