Windows 11 multi-clipboard paste not working with AHK on

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
kboom
Posts: 5
Joined: 01 Mar 2022, 14:17

Windows 11 multi-clipboard paste not working with AHK on

Post by kboom » 01 Mar 2022, 14:22

Hello,

I'm using the following AHK script to replace left ctrl and windows keys on my keyboard.

Code: Select all

; If the script is not elevated, relaunch as administrator and kill current instance:

full_command_line := DllCall("GetCommandLine", "str")

if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
{
    try ; leads to having the script re-launching itself as administrator
    {
        if A_IsCompiled
            Run *RunAs "%A_ScriptFullPath%" /restart
        else
            Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
    }
    ExitApp
}

LWin::LCtrl
LCtrl::LWin
RWin::RAlt
MButton::#Tab
WheelLeft::#^Left
WheelRight::#^Right
Works fine, but windows multi-clipboard won't paste any of the items with this on. If it's off, it works fine.
I suspect this clipboard might be invoking the now-remapped keys to do this. Perhaps it would help to make an exclusion here somehow, that if the action is coming from windows clipboard, then don't apply this mapping?
But how to do this?

Hardcoder
Posts: 278
Joined: 19 Feb 2022, 13:13
Location: Germany

Re: Windows 11 multi-clipboard paste not working with AHK on

Post by Hardcoder » 01 Mar 2022, 14:34

Sorry, I don't understand where the clipboard is involved :?:
Do you mean, you cant use the clipboard at all, when this script is running?

Edit: Oh, I just saw it's about Windows 11, is this W11 specific? I haven't even looked at that.

kboom
Posts: 5
Joined: 01 Mar 2022, 14:17

Re: Windows 11 multi-clipboard paste not working with AHK on

Post by kboom » 17 Mar 2022, 14:11

There is a multi-clipboard feature built in WIndows 11. I can't paste any item from it when AHK is running this script. Everything else is working fine.

kboom
Posts: 5
Joined: 01 Mar 2022, 14:17

Re: Windows 11 multi-clipboard paste not working with AHK on

Post by kboom » 03 Dec 2022, 09:28

It feels like the clipboard uses the key combination that AHK swapped so it's a no-op.
I don't know if there are any workarounds, but it is a great pain.

User avatar
boiler
Posts: 17043
Joined: 21 Dec 2014, 02:44

Re: Windows 11 multi-clipboard paste not working with AHK on

Post by boiler » 03 Dec 2022, 09:31

kboom wrote: There is a multi-clipboard feature built in WIndows 11.
Btw, Windows 10 also has that feature. It is usually not enabled by default but is easily enabled in Settings.

Post Reply

Return to “Ask for Help (v1)”