Remapping to Insert and PowerShell

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
ahd
Posts: 3
Joined: 01 Dec 2022, 18:33

Remapping to Insert and PowerShell

Post by ahd » 01 Dec 2022, 18:52

I have a simple remapping PrintScreen::Ins. It works fine pretty much everywhere except PowerShell. For some reason Ctrl+Ins (copy) doesn't work. It doesn't work neither in PowerShell 7.3 run in Windows Terminal, nor in older PowerShell 5.1 run in Windows Console. Interesingly, Shift+Ins (paste) works fine.

I can probably workaround this in several ways. But I would like to keep the code at minimum, so I am wondering what is so special about PowerShell, Ctrl+Ins and this remapping.

I am using 2.0-rc.1.


[Mod edit: Topic moved to v2 help.]

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: Remapping to Insert and PowerShell

Post by mikeyww » 01 Dec 2022, 19:07

Welcome to this AutoHotkey forum!

I haven't tried it, but you might want to test UI Access to see if that helps.

ahd
Posts: 3
Joined: 01 Dec 2022, 18:33

Re: Remapping to Insert and PowerShell

Post by ahd » 01 Dec 2022, 19:14

Thank you for the suggestion. I just tried with UI Access, still doesn't work.

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: Remapping to Insert and PowerShell

Post by mikeyww » 01 Dec 2022, 20:43

When I tried Ctrl+C in PowerShell, it copied the selected text.

ahd
Posts: 3
Joined: 01 Dec 2022, 18:33

Re: Remapping to Insert and PowerShell

Post by ahd » 02 Dec 2022, 03:23

mikeyww wrote:
01 Dec 2022, 20:43
When I tried Ctrl+C in PowerShell, it copied the selected text.
The problem is particularly with Ctrl+Ins which I use for copying text. I don't use Ctrl+C.

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: Remapping to Insert and PowerShell

Post by mikeyww » 02 Dec 2022, 05:57

Ctrl+PrintScreen worked here.

Specific questions:
1. Are you showing your entire script?
2. Are you running other scripts?
3. Have you examined the KeyHistory? Mine is shown below.

Screenshot 2022-12-02 055718.png
Key history
Screenshot 2022-12-02 055718.png (13.3 KiB) Viewed 341 times

Post Reply

Return to “Ask for Help (v2)”