Logitech K270 Keyboard Multimedia Button Scan Codes

Get help with using AutoHotkey and its commands and hotkeys
User avatar
montyLalor
Posts: 8
Joined: 10 Dec 2017, 06:28

Logitech K270 Keyboard Multimedia Button Scan Codes

Post by montyLalor » 11 Dec 2017, 01:46

Hi,

I'm a complete novice at AHK.

I use a Logitech K270 keyboard. How do I determine the scan codes for the multimedia keys (above the Function keys)?

I would like to do away with Setpoint, and if I was able to hotkey/remap the "Home", "Mail", "PC Power" & "Calculator" keys, my life without Setpoint would be one significant step closer....

Thanks in advance.

Luke.
My AHK knowledge currently manoeuvres with the eloquence of a fiery wall of disintegrating fuselage...
User avatar
montyLalor
Posts: 8
Joined: 10 Dec 2017, 06:28

Re: Logitech K270 Keyboard Multimedia Button Scan Codes

Post by montyLalor » 18 Dec 2017, 09:01

I used the Keyboard Hook to great effect, however, the keyboard power button refused to provide a vk code. I tried to enable it in the windows power settings (I previously had it turned off) but it still didn't want to play ball. I then Googled possible vk codes for a generic power button, and tried those codes in my script, but to no avail. At the very least, I've managed to do away with the Logitech Setpoint software.

The next challenge is to replace the caps lock state change splashes that were part of Setpoint, but I'll start another thread for that...

Below is the script I've used to replace Setpoint. It includes a vk code remap for the Windows Key. My mouse is a Logitech T400 Zone Touch. They have a front and rear micro switch. Logitech decided it might be a fun prank to have the front micro switch of the middle mouse button produce the same vk code as the Windows Key. They basically hold you to ransom, forcing you to use Setpoint to do away with that ridiculous nonsense while you remain oblivious to the wonders of AutoHotKey. Now my Windows Key is a middle mouse button! Now I can two-hand pan in CAD programs! Yay! :crazy:

Code: Select all

Logitech_K270_T400:

#NoEnv, #Persistent, #SingleInstance

vkAC::WinMinimizeAll						;Browser Home Key remap
return
!vkAC::WinMinimizeAllUndo
return

vkB4::										;Default Mail Key remap
{
	SetTitleMatchMode, 2
	IfWinExist email@workdomain.com
		{
			;MsgBox Outlook is running
			WinMaximize, email@workdomain.com, , , 
			return
		}
	IfWinNotExist email@workdomain.com
		{
			;MsgBox Outlook isn't running
			Run, "C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE"
			return
		}
}
return

;vk[**]::Run, "D:\Folder\Documents\Folder\Process Explorer\procexp64.exe"	;<- currently unable to ascertain power button vk code
;return

vk5B::MButton								;Windows Key remap
return
My AHK knowledge currently manoeuvres with the eloquence of a fiery wall of disintegrating fuselage...
geekgarage
Posts: 22
Joined: 17 Dec 2017, 11:03
GitHub: geekgarage

Re: Logitech K270 Keyboard Multimedia Button Scan Codes

Post by geekgarage » 18 Dec 2017, 15:24

have you had a look here https://autohotkey.com/docs/KeyList.htm
specific these keys
Sleep
Launch_Mail
Browser_Home
User avatar
montyLalor
Posts: 8
Joined: 10 Dec 2017, 06:28

Re: Logitech K270 Keyboard Multimedia Button Scan Codes

Post by montyLalor » 21 Dec 2017, 16:50

Thanks, geekgarage,

I looked at these a few times and tried to use a few of the vk codes in my script, but unfortunately, it looks like it's just one of those buttons that falls into the "because your keyboard driver or hardware handles it at a level too low for AutoHotkey to access" basket....

Merry Christmas, mate.
My AHK knowledge currently manoeuvres with the eloquence of a fiery wall of disintegrating fuselage...
Post Reply

Return to “Ask For Help”