If Win to remap a key just for powerPoint

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
effeppi
Posts: 4
Joined: 14 Jun 2017, 06:00

If Win to remap a key just for powerPoint

Post by effeppi » 17 May 2022, 07:22

Hi guys,
it's the very first time I write on this forum. I hope someone could help me. I do use AutoHotkey to remap my Apple keyboard and use it on a PC (where I have both Win and Mac OS installed).

I've remapped the comma key “,” on my numpad to a fullstop “.” because I need it this way for Blender and I've done it with the Sharp Keys app (I use an italian keyboard where on the numpad there is actually a comma and not a fullstop).

Now, I wanted via AutoHotkey to add an exception when using PowerPoint whereas I still need the “,” instead of the “.”. It works halfway, 'cause I do have the comma, but only if I'm writing in a Text Box. Everything else of the User Interface still uses the fullstop and not the comma. So basically, the same key has two different assignement for the very same program.

The script I'm using is as simple as:

Code: Select all

if (WinActive("ahk_exe powerpnt.exe"))
 {
	NumpadDel::SendInput {NumpadDot}
	}
Could anyone enlighten me of this “weird” behaviour?

Thanks in advance

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: If Win to remap a key just for powerPoint

Post by BoBo » 17 May 2022, 08:19

Now, I wanted via AutoHotkey to add an exception when using PowerPoint…
:arrow: #If ? :think:
For checking out if PP's input/text box has the focus you could use ControlGetFocus. Good luck :)

effeppi
Posts: 4
Joined: 14 Jun 2017, 06:00

Re: If Win to remap a key just for powerPoint

Post by effeppi » 18 May 2022, 04:55

Thanks for your answer. The # didn't do the trick unfortunately.

I'll dive into ControlGetFocus. It's really behind my understanding :lol:

Post Reply

Return to “Ask for Help (v1)”