BetaArchive Logo
Total Current Archive Size: 4765.54GB in 15409 files
Navigation Home Screenshots Image Uploader Server Info FTP Servers Wiki Forum RSS Feed Rules Please Donate
UP: 12d, 10h, 10m | CPU: 7% | MEM: 5505MB of 12279MB used
{The community for beta collectors}

Forum rules


Before you post, please make sure...

- ...you have first used Google to look for an answer, and you have asked other people you know via other methods (IM, e-mail, etc).
- ...your question has not been asked before. Search the forum first before posting.

If you meet those criteria, go ahead and post your question. Be sure to provide as much information you can about the problem and how to recreate it. Also provide information on hardware and software if applicable.


Post new topic Reply to topic  [ 7 posts ] 
Author Message
 PostPost subject: Overriding F1-F12 Keys in C#        Posted: Wed Apr 27, 2011 1:19 am 
Amateur Beta Collector
Amateur Beta Collector
Offline

Joined
Wed Apr 27, 2011 12:44 am

Posts
95

Favourite OS
WRP-MC 8400
I have done some searching and asked around, but haven't made much progress. I want to override the original functionality of the Function keys. I have tried keyboard hooks, but they don't seem to be working for me. Are there any pointers?


Top  Profile
 PostPost subject: Re: Overriding F1-F12 Keys in C#        Posted: Wed Apr 27, 2011 10:16 pm 
Amateur Beta Collector
Amateur Beta Collector
Offline

Joined
Wed Apr 20, 2011 4:51 pm

Posts
127

Favourite OS
Windows 7
Have you tried

if(e.keycode == keys.F2)
{
//Insert Code here
}


Top  Profile
 PostPost subject: Re: Overriding F1-F12 Keys in C#        Posted: Wed Apr 27, 2011 10:18 pm 
Amateur Beta Collector
Amateur Beta Collector
Offline

Joined
Wed Apr 27, 2011 12:44 am

Posts
95

Favourite OS
WRP-MC 8400
tohaaaa wrote:
Have you tried

if(e.keycode == keys.F2)
{
//Insert Code here
}


Yes, the problem with that being, it doesnt consume the key press so Windows doesn't see it.


Top  Profile
 PostPost subject: Re: Overriding F1-F12 Keys in C#        Posted: Wed Apr 27, 2011 10:20 pm 
Amateur Beta Collector
Amateur Beta Collector
Offline

Joined
Wed Apr 20, 2011 4:51 pm

Posts
127

Favourite OS
Windows 7
Wait what are you trying to achieve in this program?


Top  Profile
 PostPost subject: Re: Overriding F1-F12 Keys in C#        Posted: Thu Apr 28, 2011 12:57 am 
Amateur Beta Collector
Amateur Beta Collector
Offline

Joined
Wed Apr 27, 2011 12:44 am

Posts
95

Favourite OS
WRP-MC 8400
tohaaaa wrote:
Wait what are you trying to achieve in this program?


Turn a non media keyboard into a media keyboard... I broke my dinovo edge and I AM NOT buying a new one.


Top  Profile
 PostPost subject: Re: Overriding F1-F12 Keys in C#        Posted: Thu Apr 28, 2011 3:54 pm 
Amateur Beta Collector
Amateur Beta Collector
Offline

Joined
Wed Apr 20, 2011 4:51 pm

Posts
127

Favourite OS
Windows 7
So you want to be able to Pause, Rewind,+ Volume, - Volume?


Top  Profile
 PostPost subject: Re: Overriding F1-F12 Keys in C#        Posted: Fri Apr 29, 2011 8:16 am 
Guru Beta Collector
Guru Beta Collector
User avatar
Offline

Joined
Mon Sep 04, 2006 1:45 pm

Posts
734

Location
Norway

Favourite OS
HP keystroke RPL
Globally overriding keys is no doubt possible but for this specific purpose AutoHotKey is probably more well suited.

It's basically a scripting language for keyboard macros, making the F1-12 keys send media buttons instead can be done in a few lines like this script I use on my laptop to emulate the context menu key:
Code:
RControl & RAlt::Send {AppsKey}

Here pressing the right control and right alt sends the "AppsKey" (context menu).

_________________
Let's sperg about hardware
E6410 - i5-560m, 8GB, WXGA+, NVS 3100M, Samsung SSD 830 128GB, WWAN, 9-cell, E-Port Plus Replicator
Desktop - i5-2500k (4.3 GHz TB), 8 GB, HD6950 2GB, 2x24" 1080p, Samsung SSD 830 128GB + 2 TB stripe, Xonar D2X


Top  Profile  WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 




Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

All views expressed in these forums are those of the author and do not necessarily represent the views of the BetaArchive site owner.

Powered by phpBB® Forum Software © phpBB Group

Copyright © 2006-2013

 

Sitemap | XML | RSS