MS Keyboard Buttons

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
bevhoward
Posts: 56
Joined: 30 May 2016, 13:03
Location: Austin, Texas, USA
Contact:

MS Keyboard Buttons

02 Jun 2016, 17:04

I use several microsoft keyboards that have additional programmable buttons. Looking at the output of these buttons using microsoft's MSKey.exe utility, they show as "HID" events rather than keycodes.

Is it possible to use these additional buttons as ahk triggers? For example, a command line that would launch a specific ahk event?

I found this, but it is considerably over my head at the moment;
https://autohotkey.com/board/topic/3801 ... functions/

Thanks in advance,
Beverly Howard
User avatar
waetherman
Posts: 112
Joined: 05 Feb 2016, 17:00

Re: MS Keyboard Buttons

03 Jun 2016, 07:03

I had a similar problem with my Logitech keyboard. What I did was using the Logitech control panel to map my G1-G12 keys to simulate F13-F24 real keys. Now I can register F13-F24 hotkeys in AHK.
Image
User avatar
bevhoward
Posts: 56
Joined: 30 May 2016, 13:03
Location: Austin, Texas, USA
Contact:

Re: MS Keyboard Buttons

03 Jun 2016, 07:16

>> map my G1-G12 keys to simulate F13-F24 real keys <<

Thanks... valuable information.

Beverly Howard
Shadowpheonix
Posts: 1259
Joined: 16 Apr 2015, 09:41

Re: MS Keyboard Buttons

03 Jun 2016, 13:05

This may also be helpful to you.
User avatar
waetherman
Posts: 112
Joined: 05 Feb 2016, 17:00

Re: MS Keyboard Buttons

03 Jun 2016, 15:22

Shadowpheonix wrote:This may also be helpful to you.
NOTE: Some keys do not generate events and thus will not be visible here. If this is the case, you cannot directly make that particular key a hotkey because your keyboard driver or hardware handles it at a level too low for AutoHotkey to access. For possible solutions, see further below.
This was the scenario in my case.
Image
User avatar
bevhoward
Posts: 56
Joined: 30 May 2016, 13:03
Location: Austin, Texas, USA
Contact:

Re: MS Keyboard Buttons

03 Jun 2016, 15:34

>> If this is the case, you cannot directly make that particular key a hotkey because your keyboard driver or hardware handles it at a level too low for AutoHotkey to access. <<

That's why I was asking if there was a command line option to trigger a key in the current script. There are ahk command line options, but they seem to all be related to loading scripts and none that simply trigger events.

Thanks again... my muscle memory is going to take a couple of months to learn to stop pressing that special ms key that I have been using for the past decade ;-)

Beverly Howard
Shadowpheonix
Posts: 1259
Joined: 16 Apr 2015, 09:41

Re: MS Keyboard Buttons

06 Jun 2016, 09:25

For the command line, check the Script Parameters entry in the documentation here.
User avatar
bevhoward
Posts: 56
Joined: 30 May 2016, 13:03
Location: Austin, Texas, USA
Contact:

Re: MS Keyboard Buttons

06 Jun 2016, 09:35

>> documentation <<

Thanks... I had already been to that page, but it seems that there are only script loading options and no way to simply trigger an event within a currently loaded script.

Am I missing a way to do that?

Thanks,
Beverly Howard
Shadowpheonix
Posts: 1259
Joined: 16 Apr 2015, 09:41

Re: MS Keyboard Buttons

06 Jun 2016, 09:55

bevhoward wrote:>> documentation <<

Thanks... I had already been to that page, but it seems that there are only script loading options and no way to simply trigger an event within a currently loaded script.

Am I missing a way to do that?

Thanks,
Beverly Howard
You are correct. However, it is possible to reload the current script with different parameters by using the /r switch mentioned in that documentation I linked previously, or you can load a secondary temporary script that passes parameters to the running one using PostMessage/SendMessage.
User avatar
bevhoward
Posts: 56
Joined: 30 May 2016, 13:03
Location: Austin, Texas, USA
Contact:

Re: MS Keyboard Buttons

06 Jun 2016, 11:34

Thanks... will attempt to learn more about the /r switch.

Appreciated,
Beverly Howard

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: apeironn, peter_ahk and 324 guests