Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Keyboard Media Keys (for USB HID devices!)


  • Please log in to reply
43 replies to this topic
Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
Try removing the percent signs around the variable:
NameSize = 5000
VarSetCapacity(Name, [color=red]%[/color]NameSize[color=red]%[/color])
What the above actually does is create a variable named 5000, retrieve an empty string from it and fail to set Name's capacity. (Percent signs in expressions are used for double-derefs.)

Sebastiar
  • Members
  • 3 posts
  • Last active: Dec 15 2009 02:43 AM
  • Joined: 15 Dec 2009
Key_Action_Check:
IfEqual, Vals, 5154565548, GoSub 5154565548
Return


5154565548: ; Word
COntrolSend,, {f1}
Return



The F1 is sent to the desktop, I need to send to the active window

as it should do?

applove
  • Members
  • 1 posts
  • Last active: Mar 15 2010 04:58 PM
  • Joined: 15 Mar 2010

I put the test message in and could see the key is being detected... so I commented it out and uncommented my original send delete command... lo and behold it now works! Even the Ctrl-Alt-Delete key combo now works on XP using the Apple mini keyboard, using Eject ast the substitute key for Delete.

Cool!

And many thanks for the help.


Hello buglawton & other Gurus,

I recently bought a apple wireless mini keyboard (bluetooth 2 battery version) to use with my HP laptop and I have been using the UAWKS to get some of the non-functional keys working.

However, just like your quest a few months ago, I too tried to see if there is any way of using the eject button as the normal windows 'delete'.

A lot of googling around pointed me towards your post and I tried to copy your technique. But I am from an absolutely non-tech background and though I tried my best, I could not get anything working except for some wierd error messages.

I would be eternally grateful if you could help me out with the please :roll:

Can you please send me the .ahk files that I need to change (the ones that are successfully working for you?) so that I can compile them and run the scripts on my machine.

I love the great little keyboard, but desperately miss the normal delete button :cry:

BTW I am using Windows 7.

Thanks & regards,
Max

Kermet
  • Guests
  • Last active:
  • Joined: --
Hello,

the script itself works fine, but with my logitech keyboard there is one problem:
the volume-wheel and the mute-button are still handled by windows 7 itself with ther default functions, so when remapped with the script i get double commands (the remapped one and the original command).
is there a way to disable the handling from windows itself or catch the functions exclusive with autohotkey?

thanks

alvinp
  • Guests
  • Last active:
  • Joined: --

I put the test message in and could see the key is being detected... so I commented it out and uncommented my original send delete command... lo and behold it now works! Even the Ctrl-Alt-Delete key combo now works on XP using the Apple mini keyboard, using Eject ast the substitute key for Delete.

Cool!

And many thanks for the help.


Hello buglawton & other Gurus,

I recently bought a apple wireless mini keyboard (bluetooth 2 battery version) to use with my HP laptop and I have been using the UAWKS to get some of the non-functional keys working.

However, just like your quest a few months ago, I too tried to see if there is any way of using the eject button as the normal windows 'delete'.

A lot of googling around pointed me towards your post and I tried to copy your technique. But I am from an absolutely non-tech background and though I tried my best, I could not get anything working except for some wierd error messages.

I would be eternally grateful if you could help me out with the please :roll:

Can you please send me the .ahk files that I need to change (the ones that are successfully working for you?) so that I can compile them and run the scripts on my machine.

I love the great little keyboard, but desperately miss the normal delete button :cry:

BTW I am using Windows 7.

Thanks & regards,
Max


This script helped me a lot - the lack of the delete key was driving me insane! Here's my config if you need it. Just download and run!

http://www.alvinpoh.... ... -keyboard/

DHMH
  • Members
  • 230 posts
  • Last active: Mar 25 2012 10:34 AM
  • Joined: 17 Jul 2008
@topic:
Does this work with AverMedia remote control? I saw something like that already in this forum :D

Guest5
  • Guests
  • Last active:
  • Joined: --
Hi,
I've got a few key remaps running successfully but am struggling to get the much-coveted 'eject-to-fwd-delete' function working.
I've tried following Alvin's advice but keep getting this error when I try to run the files he's provided links to. "The program can't start because MFC71.DLL is missing from your computer." followed by "RegisterDevice failed. Errorcode: -3"
Any advice or a quick solution to getting 'eject-to-fwd-delete' wroking please?
Thanks

tabakkie
  • Guests
  • Last active:
  • Joined: --
I also have been trying to map forward delete to the eject button on my macbook.

I've actually got it working, but when I press it once it executes 2 delete actions, 1 when pressed and 1 when released.

How can I disable the release action?

Thanks.


this is my code:



Key_Action_Check:
IfEqual, Vals, 0000, GoSub 0000
Return

0000: ; eject
send {delete}
Return

tabakkie
  • Guests
  • Last active:
  • Joined: --
anybody? see above...

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
Hi, great script.

I've been testing your script to see if it will recognize the key on my remote that I can't detect with AHKHID. It seems to work pretty much the same, it sees all the other keys but the power key.
http://www.autohotke...41397&start=256

At this page,http://www.lvr.com/hidpage.htm I found a tool that gave me the usage and usage page for the power button it's usage 1 usage page 128 which is actually defined as a monitor usage page. I put this info into your script and it still doesn't receive input from it.

Can anyone tell me why the AHK scripts can't dectect this button and if there is a work around? Other software has detected it and allowed me to use it but I want to use it with AHK scripts.

Any ideas would be appreciated. Thanks

darkeyez
  • Members
  • 8 posts
  • Last active: Jun 08 2011 05:15 AM
  • Joined: 03 Jun 2011
can't seem to get these to run on my computer. get errors for the goto function and when I replace it with gosub, I get the gui in Japanese... wth?

i

Diamond
  • Members
  • 198 posts
  • Last active: Dec 02 2015 11:18 AM
  • Joined: 31 Mar 2006
Does anyone have a recent download link for these scripts?  The link in the first post seems to be broken.


rhr
  • Members
  • 217 posts
  • Last active: Feb 13 2015 02:41 AM
  • Joined: 28 Jun 2012

me too, Keyboard_Media_Keys.zip is gone, where I need donwload?


ЯHR

 

 

 

 

 


dalethefarmer
  • Members
  • 1 posts
  • Last active: Aug 09 2014 01:07 AM
  • Joined: 08 Aug 2014

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):
{C}https://ahknet.autoh... ... 20Keys.zip{C}

Micha's original script thread:
http://www.autohotke...opic.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?

Hi, your zip download link does not work.