键盘快捷键映射器 [英] keyboard shortcut mapper

查看:272
本文介绍了键盘快捷键映射器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想尝试实现一个程序,该程序将允许键盘快捷键(例如,按CTRL-1,CTRL-2)映射到某些文本并将其粘贴到焦点所在的网页/应用程序中.

我应该怎么做呢?顺便说一句,我希望能够在C#.NET中做到这一点

它需要能够不使用通用的CTRL-C和CTRL-V,我希望它是自定义键盘热键粘贴.

谢谢,

Jase

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

推荐答案

1)制作一个程序,该程序创建一个全局键盘挂钩.
在C#中处理全局鼠标和键盘挂钩 [ ^ ]
一个简单的C#全局低级键盘挂钩 [ ^ ]
.NET中的全局系统挂钩 [ SendKeys [
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.


这篇关于键盘快捷键映射器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆