Using Autohotkeys with Keyman

I have been using both Keyman and Autohotkey for many years - both of them fantastic pieces of software! However, I have just recently found some conflict between the two. It seems that, when Keyman is running, the hotstring functionality of Autohotkey is disabled. I presume this has something to do with keyboard hooks and conflicts between the two programs.

However, I would dearly love to resolve the problem as I need the functionality of both Keyman and the Autohotkey hotstrings.

Any help would be greatly appreciated!

Hi @Bruce, welcome to the community!

I suspect that any conflict between Keyman and Autohotkey may be due to Keyman’s serialised input queue. This feature ensures that rapidly typed sequences don’t end up out of order. You can read (much) more technical detail on our blog at https://blog.keyman.com/2018/10/the-keyman-keyboard-input-pipeline/

It is possible to disable the serialised input queue, which you could do to test this theory. This requires making a change to the Windows registry.

Warning: Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. We cannot guarantee that these problems can be solved. Modify the registry at your own risk.

  1. Start Registry Editor (regedit.exe)
  2. Navigate to HKEY_CURRENT_USER\Software\Keyman\Keyman Engine
  3. Select Edit/New/Key and name the key Debug.
  4. Select the new Debug key, and select Edit/New/DWORD value and name the value Flag_ShouldSerializeInput. It will be created with the default value 0.
  5. Exit and restart Keyman (you may need to restart Windows).

Hi Marc
I was very pleased to find your reply to Bruce’s post as I’m having exactly the same problem. So I changed the registry as you described, but unfortunately this this didn’t get me any further.

  • In addition to AHK hotstrings still not working, rotas (as they are called in InKey, where you press a key multiple times) now don’t work properly any more.
    The following normally lets me press SHIFT LCTRL LALT K_1 once to produce ½, twice to produce ⅓, and three times to produce ¼:
   + [SHIFT LCTRL LALT K_1] > '½'
   '½' + [SHIFT LCTRL LALT K_1] > '⅓'
   '⅓' + [SHIFT LCTRL LALT K_1] > '¼' 

But with the new Registry key this produces a string of all three, ½⅓¼, which is of course not what we want.

  • In addition, any RALT key combinations don’t work any more. They just don’t produce anything.

After removing the Debug Registry key, things are back to ‘normal’, except that, of course AHK hotstrings don’t work, which is a real bummer, because I have hundreds of them!

In InKey 2, AHK hotstrings sometimes don’t work any more either. In such a case I just need to restart the specific AHK script and then they work again. But how can I get it to work with Keyman at all? It would be really great if a solution could be found for this!

This then, is my request, to make Keyman work with AutoHotkey.
Thanks,
Roland

PS: I’m using Keyman 14.0.270
PPS: This editor doesn’t let me start a line with + (it changes it to a list bullet), so I needed to put a dot before it.

Hmm. It will be difficult to get AutoHotkey and Keyman to work together with the serialised input queue.

I’m surprised that rotas and RALT don’t work with the serialised input queue off, however. They should. I’ve noted this for investigation but it may take some time to find a solution.

Noted as a feature request!

Surround the text with backticks (`) to make text into code or surround three backticks on a new line to

make a code block.