geekhack

geekhack Community => Keyboards => Topic started by: nogamesplayed on Mon, 05 August 2013, 03:33:34

Title: AutoHotKey + Ducky Shine II issues
Post by: nogamesplayed on Mon, 05 August 2013, 03:33:34
Hi all,

I've searched high and low for answers but have always come up short.

I'm trying to remap the keys above the numpad on the Ducky Shine II (DK9008S) but having issues along the way.

The new functions work and have been assigned, however I am unable to disable the default function of the keys (ie calc, explorer, mail, browser). So they both fire.

This is what I currently have for AutoHotKey:
Code: [Select]
SC121::Media_Play_Pause
sc16b::Volume_Mute
sc16c::Volume_Down
sc132::Volume_Up

I'm not too sure why the default function of the key continues to work because AFAIK AHK overrides it. However I might be missing something so any suggestions are extremely appreciated.

Thanks in advance!
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: SpAmRaY on Mon, 05 August 2013, 09:31:50
You might check this thread

http://geekhack.org/index.php?topic=35787.msg702131#msg702131
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: nogamesplayed on Mon, 05 August 2013, 17:39:59
You might check this thread

http://geekhack.org/index.php?topic=35787.msg702131#msg702131

I'm afraid there's not much detail in that thread. I searched for all threads with ducky + autohotkey/akh earlier and didn't find anything relevant so I posted this thread.

I PM'd the user however so hopefully he blesses me with his insight :p
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: rowdy on Mon, 05 August 2013, 17:45:07
From that post it would seem that you cannot redefine them.
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: nogamesplayed on Mon, 05 August 2013, 17:46:38
From that post it would seem that you cannot redefine them.

User commented this right afterwards:

Well after an hour or two of prying further into this I finally managed to remap the keys to different applications using AutoHotkey.
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: esoomenona on Mon, 05 August 2013, 17:54:14
Can I see how your code looks?
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: nogamesplayed on Mon, 05 August 2013, 17:56:43
Here you go:

Code: [Select]
;Multimedia Keys

SC121::Media_Play_Pause
sc16b::Volume_Mute
sc16c::Volume_Down
sc132::Volume_Up
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: esoomenona on Mon, 05 August 2013, 17:59:08
And when you press one of those keys, it performs the function you have set, as well as it's original function simultaneously?
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: nogamesplayed on Mon, 05 August 2013, 18:00:43
Yes. So if I press SC121 (calculator), it'd both play/pause the music and open the calculator.
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: esoomenona on Mon, 05 August 2013, 18:06:22
That's weird. Have you tried using Send and/or Return?
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: nogamesplayed on Mon, 05 August 2013, 18:36:43
Holy $&@# .. I don't know what I did, but it works fine now :\

Well I think I do know what I did. Yesterday I was reading a thread about remapping a 2108S with the Microsoft Intellitype Pro software. So I tried this, unsuccessfully. But I had to uninstall my mouse software first, which coincidentally bundles keyboard software as well (Microsoft Mouse and Keyboard Center). I'm guessing that has been somehow clashing with AutoHotKey.

I just uninstalled it and the issues went away, and AHK is working as expected.

Thanks for your help everyone :)
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: esoomenona on Mon, 05 August 2013, 18:40:05
Glad everything worked out for you.
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: nogamesplayed on Mon, 05 August 2013, 18:43:51
Haha yep! Now to buy some media keycaps :)
Title: Re: AutoHotKey + Ducky Shine II issues
Post by: sunbathingjackdaw on Thu, 22 August 2013, 00:02:55
I don't have any mouse or keyboard software installed at all - just the very simple auto-install drivers - and I'm still having this dual behavior on keypress. Mine is a Ducky DK9008G2. I set my right-most function key ("Home") to Sleep using the following AHK script:
Code: [Select]
; Sleep Via Multimedia Key
SC132::
; Sleep/Suspend:
DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
; Hibernate:
;DllCall("PowrProf\SetSuspendState", "int", 1, "int", 0, "int", 0)
Return
But it both starts a fresh Chrome window and puts the computer to sleep. On the plus side, I've got a fresh Chrome browser ready as soon as my computer wakes up... But I'd still prefer to remove the extra behavior. ;)