Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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
Posted 26-Jan-12 7:05am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
Comments
Amir Mahfoozi at 29-Jan-12 9:56am
   
+5
Espen Harlinn at 29-Jan-12 13:32pm
   
Thank you Amir!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Your easiest solution would be to download the software:
http://www.logitech.com/support-downloads[^]
  Permalink  
Comments
NeptuneHACK! at 26-Jan-12 13:30pm
   
That's not what I had in mind, but anyways I checked the website, and there's no software available for my Keyboard.
johannesnestler at 26-Jan-12 18:08pm
   
I can't believe it... what kind of super keyboard is that?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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....
 }
}
  Permalink  
v2
Comments
NeptuneHACK! at 29-Jan-12 8:10am
   
well this I like, the problem is that I want to capture input Globally meaning not just in my winforms app, but any ways thanks :)

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 505
1 OriginalGriff 258
2 ChintanShukla 195
3 Bhavik_Patel 170
4 Richard Deeming 165
0 Sergey Alexandrovich Kryukov 8,688
1 OriginalGriff 7,237
2 CPallini 2,598
3 Richard MacCutchan 2,080
4 Abhinav S 1,888


Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 29 Jan 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100