Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to try and implement a program that will allow keyboard shortcuts, eg CTRL-1, CTRL-2 when pressed to map to some text and paste it to a webpage/app in focus.

How should I go about doing this ? btw I want to be able to do it in C#.NET

It needs to be able to not use the generic CTRL-C and CTRL-V I want it to be custom keyboard hotkey pasting.

Thanks,

Jase
Posted
Updated 21-Aug-12 0:53am
v4

1 solution

1) Make a program, that creates a global keyboard hook.
Processing Global Mouse and Keyboard Hooks in C#[^]
A Simple C# Global Low Level Keyboard Hook[^]
Global System Hooks in .NET[^]
and so on...
2) Than use the SendKeys[^] class to send the desired text on hooked event to the application in focus.
 
Share this answer
 

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