启用键盘功能键. [英] enable Keyboard functions keys..

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

问题描述

您好,编码员,
我有一个"Logitech"键盘,但不幸的是,它没有随附软件包,可以帮助我使用功能键"F1,F2,F3 ...等"& ;;如您所知,如果我只能编写在后台运行的程序,则这些键非常有用,该程序允许我指定 Windows7环境下的每个键. br/>
例如:
F12 =锁定
F11 =重新启动
F10 =睡眠
F9 =复制
F8 =粘贴
F7 =剪切
F5 =运行反恐精英:源代码"
F4 =运行"FireFox"
F3 =自动键入以下句子:"example ......."

等等..

所以我想知道你们是否可以给我正确的代码来执行此操作,您将无法想象如果你们为我解决了这个问题,我将多么感激.

提前谢谢!
问候,
Safi

Hello fellow coders,
I have a "Logitech" Keyboard, but unfortunately no software bundle came with it, to help me use the Function keys "F1, F2, F3...etc" & as you know these keys are very useful if I could only write a program that runs in the background, that allows me to specify a function to each key under Windows7 Environment.

For Example:
F12 = Lock
F11 = Restart
F10 = Sleep
F9 = copy
F8 = paste
F7 = Cut
F5 = Run "Counter-Strike: Source"
F4 = Run "FireFox"
F3 = Auto-type the following sentence: "example......."

and so on..

So I was wondering if you guys could give me the right code to do this, you won''t imagine how grateful I would be if you guys solved this issue for me.

Thank you in advance!
Regards,
Safi

推荐答案

看看: C#中的应用程序和全局鼠标和键盘挂钩.Net库的文章 [
Have a look at: Processing Global Mouse and Keyboard Hooks in C#[^]

it''s an article on Application and Global Mouse and Keyboard Hooks .Net Libary in C#[^] from CodePlex.

Best regards
Espen Harlinn


最简单的解决方案是下载软件:
http://www.logitech.com/support-downloads [
Your easiest solution would be to download the software:
http://www.logitech.com/support-downloads[^]


每个属性和表单都有该事件...
即按键事件...
您可以使用

there is the event for every properties and forms...
i.e keydown event...
you can use

private void frm_KeyDown(object sender, KeyEventHandeler e)
{
 if(e.KeyCode==<inter value of the key>)
 {
   //work....
 }
}


这篇关于启用键盘功能键.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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