[SOLVED] Listary blocks Autohotkey (key events) when running under admin

I’m using Autohotkey for key remapping and one of the most useful key remapping I have in place is ALT + ijkl for movement.

From version 4.22, I noticed Listary stops any keys from propagating to Autohotkey when I open Listary via a shortcut - meaning when I’m in a folder and start typing a filename I can freely use ALT + i (or any Autohotkey mappings) to move down in listary’s list of files, but when I use a hotkey to invoke listary window, the keys are being blocked for some reason. No keys are being registered in Autohotkey at all.

EDIT: After some further examination, it seems it doesn’t work when listary is run as administrator. When I run listary under normal privileges, it works (propagates key events). That being said, I think even 4.20 might have been suffering from the same problem, but I just haven’t been running it under admin rights.

Thanks for your feedback. Can you paste your AHK script here or send it to support@listary.com for testing purposes?

A simple .ahk script that fails to work when listary is run as administrator:

; press Pause to call a message box
Pause::MsgBox, test

; ALT + i/j/k/l for movement
!i::SendInput {Up}
!k::SendInput {Down}
!j::SendInput {Left}
!l::SendInput {Right}

I think this issue has nothing to do with AHK or Listary. If you run Listary as admin, it becomes untouchable for AHK because AHK is running as normal user.

If you run some other applications as admin, you should not be able to use this AHK script either.

I’ll be da… I think you’re right. It didn’t use to happen to me because I was running on admin account with zero UAC, only lately I’ve made some changes and since then many things behave very differently. Thanks for your help.

Dwelle - Check this thread for some ways to make an AHK script determine if it is running as admin and if it isn’t, to relaunch as admin automatically. If UAC is enabled you will get a UAC prompt. If you want to start it without a UAC prompt, use a scheduled task in the Microsoft Task Scheduler.


Jason, the script is working perfectly (even with Listary running as admin, too). Thanks for pointing it out to me.