remap to open windows clipboard history

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
shemesh
Posts: 23
Joined: 19 Mar 2019, 16:45

remap to open windows clipboard history

Post by shemesh » 30 Jan 2023, 15:41

hi,
i would like to remap ralt+p to open the windows clipboard history window, like win+v
tried this:

Code: Select all

RAlt & p::
{
	Send "#v"
}
but once i release the keys the window is closed
how do i preserve same behavior as win+v

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

Re: remap to open windows clipboard history

Post by mikeyww » 30 Jan 2023, 16:46

To use an expression with a v1 command, you would force it via %.

Code: Select all

#Requires AutoHotkey v1.1.33
>!p::Send % "#v"
It's important not to mix the syntax from the other version. V1 does not use braces to bound a hotkey subroutine.

Finally, when you can avoid a custom combination with a dedicated prefix key, avoid it. This is usually the case when the prefix key would be a modifier key.

Code: Select all

#Requires AutoHotkey v2.0
>!p::Send "#v"

shemesh
Posts: 23
Joined: 19 Mar 2019, 16:45

Re: remap to open windows clipboard history

Post by shemesh » 31 Jan 2023, 02:18

me using v2.
the problem remains the same...
alt+p remap indeed open the clipboard window but when releasing the keys it is immediately closed, making it unusable.
when using the original win+v the window is opened, and stay opened even when keys are released.
how can i achieve same behavior?


[Mod action: Moved topic to v2 section of “Ask for Help”]

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

Re: remap to open windows clipboard history

Post by mikeyww » 31 Jan 2023, 07:06

1. Please post your complete script in a new reply below.
2. Are any other scripts running at the same time?

shemesh
Posts: 23
Joined: 19 Mar 2019, 16:45

Re: remap to open windows clipboard history

Post by shemesh » 31 Jan 2023, 07:44

hmmm... seems like a conflict with programs that use Alt key as shortcut for menus.
this works as expected: >^p::Send "#v"
this apparently is conflicting with the Alt: >!p::Send "#v"

got a solution for this conflict?

p.s. me on ahk v2.0.2

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

Re: remap to open windows clipboard history

Post by mikeyww » 31 Jan 2023, 07:57

Would see: https://www.autohotkey.com/docs/v2/lib/A_MenuMaskKey.htm

It's no guarantee, but resolves certain problems.

Post Reply

Return to “Ask for Help (v2)”