Why is notepad++ blocking my autohotkey shortcuts?

9

1

I have a series of keyboard shortcuts defined in my autohotkey script. Currently, none of them work whenever notepad++ has focus.

The script is loaded as usual. The keyboard shortcuts (mostly stuff for moving windows around) work perfectly with any other window, they just don't do anything if the notepad++ window has focus. At the same time, all regular windows shortcuts work fine, even while notepad++ has focus. So it is a specific issue between notepad++ and autohotkey.

The shortcuts I've defined in my script don't conflict with any of notepad's standard keyboard shortcuts. Does anyone know what's happening?

Using Windows 7, notepad++ v5.8.1, autohotkey v1.0.48.03

Malabarba

Posted 2010-09-30T01:56:48.803

Reputation: 7 588

Answers

8

For me, it was enough to restart Notepad++, so try that first.

Godsmith

Posted 2010-09-30T01:56:48.803

Reputation: 330

3

Embarrassingly enough, I restarted my PC and now it's back to normal. I have to learn to do that before asking here...

Malabarba

Posted 2010-09-30T01:56:48.803

Reputation: 7 588

3

I think autohotkey will fail to load the keyboard hook unless you run it as admin. If this is the case your keys won't work when another app (notepad++ or otherwise) has focus.

(I've experienced this behaviour (albeit intermittently) on autohotkey and winamp)

RJFalconer

Posted 2010-09-30T01:56:48.803

Reputation: 9 791

1autohotkey doesn't have to run with admin rights to work properly. It seems rather that some applications need to be restarted to take into account the changes made into autohotkey. – Nicolas – 2014-07-08T20:44:29.493

2Because I started running Notepad++ always as an admin, AHK wasn't working in Notepad++ without having admin priviliges. Thanks for the tip, this is the only thing that worked for me. – Rav – 2019-02-05T11:59:08.360

1

When running autohotkey with normal user rights while running another application (notepad++) with elevated rights, autohotkey seems to be unable to handle the keyboard input. This makes sense from a rights management perspective…

The solution is to run autohotkey with admin rights -> then the script will be able to handle all input.

M. Buerkle

Posted 2010-09-30T01:56:48.803

Reputation: 11

This was my problem and worked for me. – bugybunny – 2019-01-08T10:44:17.730