AutoHotkey Community

It is currently May 25th, 2012, 11:38 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: December 30th, 2005, 5:13 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
This set of 2 scripts and Micha's DLL file (thanks again Micha! couldn't have done it otherwise) allow you to replace the default actions of those media keys on some keyboards (like Play, Pause, Volume, etc) by defining your own actions.

This could probably also be used for other USB devices with very few changes.

I've included an instructions text file and examples/info at the top of each script file. Please take a look at them or else you probably won't get very far :)

As an example of what it can do: I've currently remapped the volume wheel on my keyboard to adjust the master volume and display a simple On Screen Display (OSD) of the action and the volume level.

Download link (zip file):
http://autohotkey.net/~evl/KeyboardMedi ... 20Keys.zip

Micha's original script thread:
http://www.autohotkey.com/forum/viewtopic.php?t=6367

It would be helpful to others if anyone using the script could report back their keyboard make/model and if they had to change the EditUsage and EditUsagePage values from the default (all described in the zip file).


p.s. Micha, I hope you don't mind me including your DLL file in the zip file?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 30th, 2005, 3:04 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Nice post. This will be a great resource to those who want to customize their keyboard in ways the manufacturer doesn't support.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 30th, 2005, 10:35 pm 
Hi evl,
great job!

Feel free to use the dll and script in any way you desire!

Nice to see my little work be useful.

I have to mention that there could be a problem (somewhere).
I use a remote control. When I record the same key a lot of times the rawdata changes somehow.
When recording the key it shows the value "53570000". After a few times using it, the value changes to 53570053.
I guess there's something wrong with the conversion-routine or my dll. If I find something, I will post it.

Ciao
Micha


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 31st, 2005, 12:39 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
@Micha:
Thanks for all the work and making the dll available to use :D

I haven't really seen any issues yet, but I've not been using it long enough to notice perhaps.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 7th, 2007, 6:50 pm 
Wow! This is really awesome!
I tried it with my Logitech Cordless Keyboard (I wonder how it is named...) and it was super easy to set up and it detects every single of my 30+ Media Keys apart from the second enter key I got.
I'm using this now as a sleek replacement for the clunky Logitech driver.
I just wonder why noone answered in this thread since over a year? Is there another, more supported version out?

Thanks a lot!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 23rd, 2007, 7:39 pm 
Offline

Joined: October 15th, 2007, 2:02 am
Posts: 9
hi, i use and i liked very much

I just want put more than one line of code
but your program just accept one line
It is possible to put more than one code in the same line?

like change this

IfWinNotActive, ahk_class BSPlayer
WinActivate, ahk_class BSPlayer
IfWinActive, ahk_class BSPlayer
Send, {SPACE}

for something in one line only

Because if i change the in the file "Keyboard Media Keys Actions" and put several lines ( and work fine)
When i try to run "Keyboard Media Keys - detect keys" and add up a key
I have to go back to "Keyboard Media Keys Actions" and change again


tks very much and congratz for the excellent script


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 25th, 2007, 5:35 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
I made it only use one line of code to keep things simple. You can change it manually as you did. One solution is to have the key (the single line of code) run another script which contains the longer code you want to run.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 23rd, 2008, 2:23 am 
Offline

Joined: November 25th, 2004, 10:08 am
Posts: 57
evl, thanks for the scripts. It looks like it will be useful. I have a Logitech Cordless Wave Desktop and haven't been able to map most of the keys using the conventional methods but they all seem to be detectable using this method.

One interesting key is called "Fn" which is used to activate special functions on the F1-F12 and Print Screen and Pause keys. I actually expected that this button wouldn't send any data itself, but it does. Your script detects the Fn key as soon as it is pressed. I'm wondering if there's a different code sent when the Fn key is pressed in combination with one of its target buttons or if it just sends the one code and the combination is interpreted by the Logitech driver?

Also, the Fn key is between the right Alt and Ctrl. I'd much rather it be the RWin key which I used extensively on my last keyboard as a modifier for other hotkeys. In your script, the action defined for the Fn key is executed as soon as the Fn key is pressed. Is there any way I could remap the Fn to Rwin? This would require, I think, detecting both the key down and key up events so that Rwin could be virtually pushed down then virtually released at the appropriate times.

Thanks!


Report this post
Top
 Profile  
Reply with quote  
PostPosted: February 1st, 2008, 11:04 am 
Hi guys, thanks a lot both for AutoHotKey and for Keyboard Media Keys library.

If was trying to force my upper buttons of split Microsoft natural keyboard to do the activating of window based on its title.

There were two problems:
1) even if I uninstalled keyboard drivers, it was starting homepage when I hit Home special button
2) keys labeled 1 to 5 were detected with same key code in Keyboard media keys(0000004800000049)

So finally I achieved what I wanted by using original Microsoft drivers and assigning AHK scripts to the keys - read "Create shortcut to activate window by title" at http://jetensky.net/blog/2008/02/01/cre ... -by-title/


Report this post
Top
  
Reply with quote  
PostPosted: February 5th, 2008, 3:02 pm 
Offline

Joined: July 21st, 2006, 12:26 am
Posts: 223
Goldship Arch Slim Keyboard Office: Fn cannot be remapped, not a real key

Multimedia Keys Map:
http://docs.google.com/Doc?id=ddtm4wmw_116tj5svdvr


Last edited by k3ph on April 13th, 2008, 5:05 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2008, 10:11 am 
I used this script on my mac wireless bluetooth keyboard which I use on my pc. It works great for the eject and fn button.

However I wonder if it is also possible to remap the buttons instead to run a function. For example I would like my eject button to be delete.

Thanks


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2008, 10:36 am 
ok sorry this is easy of course:


4854: ; eject -> delete
send {delete}
Return


Report this post
Top
  
Reply with quote  
PostPosted: June 16th, 2008, 10:48 pm 
Offline

Joined: June 16th, 2008, 10:40 pm
Posts: 6
Hi,
Thank you for these scripts. I have a dell multimedia keyboard that has worked on every computer for years, except for this HP laptop that I use at work. So I used these scripts to program the volume and the media keys.

I'm wondering, I've seen some scripts that have a Bar Graph type of display for the Volume, but no matter how I tried to add them to Keyboard Media Keys Actions.ahk I kept on getting errors.

Any thoughts on how this can be achieved?

Best Regards


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 17th, 2008, 5:57 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
show how you are adding the code.

If you want, start a new topic in Ask for help, (with a link to this topic) and more people will see your question.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2008, 8:50 pm 
Offline

Joined: August 21st, 2008, 8:08 pm
Posts: 1
Hi,

I have been trying to use the tips in this thread to get the Eject button on my new compact keyboard (menat for a MAC, but I want to use it with my Shuttle PC) to do something useful. "Copy" would be useful, i.e. "send {LControl}{c}.

I cannot get it to work, though. I have used the "Keyboard Media Keys - detect keys" script, and it detects the Eject key with key code 53550048000000 (seems a bit long, can that be right?). I ran the "Keyboard Media Keys" script and it created "Keyboard Media Keys Actions", but when I run that, the Eject key is still ignored.

What could I be doing wrong, or failing to do right?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: infogulch, Opal Monkey, tidbit and 10 guests


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

Search for:
Powered by phpBB® Forum Software © phpBB Group