Default multimedia keyboard keys changed - yes, is possible to use without AHK running script

Get help with using AutoHotkey and its commands and hotkeys
MIRKOSOFT
Posts: 285
Joined: 23 Sep 2014, 14:29

Default multimedia keyboard keys changed - yes, is possible to use without AHK running script

19 Dec 2016, 08:52

Hi!

I wanted to replace Calc button (AppKey2) on my keyboard by function to call any or more AHK scripts when no one is runing.
I did it successfuly by writting ShellExecute string value with filename to registry key:

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\18
There are also other keys - representing subkeys:
15
16
17
18 - this I know - it's App2 or Calc
7
'cause I know only two AppKeys (1 and 2 - computer and calc) - other multimedia keys have here values too?
If yes - know anybody help me with whole values list?
Thank you all for sharing this feature.

Miro
User avatar
BGM
Posts: 464
Joined: 20 Nov 2013, 20:56
GitHub: bgmCoder
Contact:

Re: Default multimedia keyboard keys changed - yes, is possible to use without AHK running script

19 Dec 2016, 09:57

Did you try the Autohotkey docs? Look under "key list" at "multimedia" - there is a whole list of them.

You probably want Launch_App1 or Launch_App2 - first launches My Computer, the latter launches calculator
Acecool
Posts: 37
Joined: 10 Jan 2016, 18:25
Facebook: Acecool
Google: Acecool
GitHub: Acecool
Contact:

Re: Default multimedia keyboard keys changed - yes, is possible to use without AHK running script

19 Dec 2016, 10:26

On the Logitech K350 it is SC121

The issue is not all of the keys / combinations are readable without SetPoint.. The issue with SetPoint is that it breaks mouse clicking ( and holding ) in all games.. Ie click and hold mouse 4 in GTA 5 to "hide in car" won't work with SetPoint open because it changes the behavior of Mouse buttons to no longer allow holding them down.. ie on click it performs click, release... on release it performs nothing...

and here are the others:

Code: Select all

;;
;; Logitech K350 Media and Special Keys
;;
;; Note, the following are missing: 
;;	 0 )	[ Untested ] FN + F12 ( Eject Disc ) [ Can't Test until I hook up disc drive ]
;;	 0 )	[ Untested ] PC Sleep
;;	 1 )	Cog on top of app button ( Top Left )
;;	 2 )	Camera Button ( Top Left )
;;	 3 )	Zoom In ( Left-Side )
;;	 4 )	Zoom Out ( Left-Side )
;;	 5 )	Application Overlay ( Left-Side )
;;	 6 )	FN
;;	 7 )	FN + F1 ( Launch Word )
;;	 8 )	FN + F2 ( Launch Excel )
;;	 9 )	FN + F3 ( Launch Calendar )
;;	10 )	FN + F4 ( Special Key A )
;;	11 )	FN + F5 ( Special Key B )
;;	12 )	FN + F6 ( Special Key C )
;;	13 )	FN + F8 ( Launch Messenger )
;;	14 )	FN + F11 ( Display Battery Information )
;;	16 )	FN + Pause/Break ( Downloads? )
;;
;;
;;							VK		SC
;;------------------------------------------------------------------------------------------------------
; Volume Up Key				AF		130		a		d	1.70	Volume_Up
; -------------				AF		130		a		u	0.19	Volume_Up
							
; Volume Down Key			AE		12E		a		d	0.42	Volume_Down
; -------------				AE		12E		a		u	0.14	Volume_Down
							
; Media Seek Back			B1		110		a		d	4.05	Media_Prev
; -------------				B1		110		a		u	0.20	Media_Prev
							
; Media Seek Next			B0		119		a		d	0.58	Media_Next
; -------------				B0		119		a		u	0.22	Media_Next
							
; Media Stop				B2		124		a		d	0.63	Media_Stop
; -------------				B2		124		a		u	0.19	Media_Stop
							
; Media Play/Pause			B3		122		a		d	0.70	Media_Play_Pause
; -------------				B3		122		a		u	0.17	Media_Play_Pause
							
; Volume Mute				AD		120		a		d	0.42	Volume_Mute
; -------------				AD		120		a		u	0.14	Volume_Mute
							
; Music / Tunes Button		B5		16D		a		d	7.88	Launch_Media	Opens: Groove Music
; -------------				B5		16D		a		u	0.19	Launch_Media
							
; Media Center Button		B5		16D		a		d	0.88	Launch_Media 	Opens: Groove Music
; -------------				B5		16D		a		u	0.19	Launch_Media
							
; Calculator Button			B7		121		a		d	9.61	Launch_App2
; -------------				B7		121		a		u	0.16	Launch_App2
		
; Apps Context Menu			5D		15D	 	d			2.23	AppsKey        	
; [ FN + PrintScreen ]		5D		15D	 	u			0.16	AppsKey        	
				
; Scroll Lock				91		046	 	d			2.73	ScrollLock     	
; [ FN + Pause/Break ]		91		046	 	u			0.17	ScrollLock






;;
;; K350 Special Buttons - Media Center ( And Music / Tune Icon Button )
;; Open Volume Mixer so you can change volume for each individual app that is open...
;;
; SC16D up::Send {Blind}{Lwin up}
SC16D::
	;; If it isn't open, open and move it into position ( for me it is to the right monitor ) - I am going to write a monitor class to make positioning much easier and more intuitive for different monitors which will be included with my framework...
	if !WinExist( "ahk_exe SndVol.exe" )	
	{
		Run C:\Windows\System32\SndVol.exe
		WinWait, ahk_exe SndVol.exe
		WinMove, ahk_exe SndVol.exe,, 2808, 700, 1036, 347
	}
	else
	{
		;; If it is opened and we clicked the button again, then we want to close it.. Or if you want to activate it ie bring it to foreground / focus then uncomment / comment the following lines...
		; WinActivate, ahk_exe SndVol.exe ; [, WinTitle, WinText, SecondsToWait, ExcludeTitle, ExcludeText]
		WinClose, ahk_exe SndVol.exe
	}
return


;;
;; K350 Special Buttons - Calculator
;;
; SC121 up::Send {Blind}{Lwin up}
SC121::
	run calc
return
-Josh 'Acecool' Moser
I teach various programming languages, game programming, etc... I am also taking on programming jobs as my health allows.
MIRKOSOFT
Posts: 285
Joined: 23 Sep 2014, 14:29

Re: Default multimedia keyboard keys changed - yes, is possible to use without AHK running script

19 Dec 2016, 10:50

You understand me not - I mean Windows registry values.
To apply when AHK is not running - I need not to remap all, I want only to use one of them to start one AHK script where they're mapped.
Value like 18 in registry.
Long time I was trying to replace Calc by my own app for this purpose written in VB, but never successful, now I found this solution on the web and it works.
So, if are available more values I can select between 'cause I'm using multimedia keyboard.

Miro
Acecool
Posts: 37
Joined: 10 Jan 2016, 18:25
Facebook: Acecool
Google: Acecool
GitHub: Acecool
Contact:

Re: Default multimedia keyboard keys changed - yes, is possible to use without AHK running script

19 Dec 2016, 11:26

I know you're not using AHK to rebind the keys ( this is old ) - but not all keys are accessible from what I've seen... If you figure out how to access all of the other keys, let me know!
-Josh 'Acecool' Moser
I teach various programming languages, game programming, etc... I am also taking on programming jobs as my health allows.
MIRKOSOFT
Posts: 285
Joined: 23 Sep 2014, 14:29

Re: Default multimedia keyboard keys changed - yes, is possible to use without AHK running script

19 Dec 2016, 11:35

Each key?
If yes, I'll try Spy+ and try to use keymap values of VICE emulator... If it will work, I post it here.

Miro
MIRKOSOFT
Posts: 285
Joined: 23 Sep 2014, 14:29

Re: Default multimedia keyboard keys changed - yes, is possible to use without AHK running script

19 Dec 2016, 19:59

For now default values in registry are:

15 Mail
16 Media Stop - this one can confirm tomorrow
17 App1
18 App2
7 Browser Home

Miro

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], chngrcn, Google [Bot], Odlanir and 46 guests