No way to disable "WIN + V" or related shortcuts? #19519

Closed
opened 2026-01-31 06:45:46 +00:00 by claunia · 6 comments
Owner

Originally created by @willxie on GitHub (Mar 11, 2023).

Windows Terminal version

1.16.10262.0

Windows build number

Windows 11 22H2 (22621.1344)

Other Software

I am using AutoHotKey with Terminal. I noticed that compared to Powershell and Command prompt, Windows Terminal implicitly overrides "WIN + V" shortcuts, with V being any key. I use AutoHotKey to remap "WIN+C" + "WIN+V" to "CTRL+C" and "CTRL+V" respectively. It works well in most applications such as chrome and other terminals. In Windows Terminal, it does not respect these overrides.

I don't see a way to change this behavior in settings as it is not one of the shortcuts.

Steps to reproduce

Create AutoHotkey with simple overrides for WIN key shortcuts.

#SingleInstance, Force
SendMode Input

; Copy, paste, cut
#c::
Send, ^c
Return

#v::
Send, ^v
Return

Expected Behavior

It should behavior like other terminal apps and respect the overridden behavior from AHK. In this example, WIN+C and WIN+V should do copy and paste.

Actual Behavior

WIN+C opens microsoft teams
WIN+V opens clipboard history menu.

Originally created by @willxie on GitHub (Mar 11, 2023). ### Windows Terminal version 1.16.10262.0 ### Windows build number Windows 11 22H2 (22621.1344) ### Other Software I am using AutoHotKey with Terminal. I noticed that compared to Powershell and Command prompt, Windows Terminal implicitly overrides "WIN + V" shortcuts, with V being any key. I use AutoHotKey to remap "WIN+C" + "WIN+V" to "CTRL+C" and "CTRL+V" respectively. It works well in most applications such as chrome and other terminals. In Windows Terminal, it does not respect these overrides. I don't see a way to change this behavior in settings as it is not one of the shortcuts. ### Steps to reproduce Create AutoHotkey with simple overrides for WIN key shortcuts. ``` #SingleInstance, Force SendMode Input ; Copy, paste, cut #c:: Send, ^c Return #v:: Send, ^v Return ``` ### Expected Behavior It should behavior like other terminal apps and respect the overridden behavior from AHK. In this example, WIN+C and WIN+V should do copy and paste. ### Actual Behavior WIN+C opens microsoft teams WIN+V opens clipboard history menu.
claunia added the Issue-QuestionNeeds-TriageResolution-Answered labels 2026-01-31 06:45:46 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Mar 12, 2023):

Huh, that's really interesting! We're surely not doing anything with win ourselves. Perhaps this is a AHK bug with the way they send keys to XAML Islands applications like the Terminal/?

@zadjii-msft commented on GitHub (Mar 12, 2023): Huh, that's really interesting! We're surely not doing anything with <kbd>win</kbd> ourselves. Perhaps this is a AHK bug with the way they send keys to XAML Islands applications like the Terminal/?
Author
Owner

@zadjii-msft commented on GitHub (Mar 12, 2023):

This thread: https://www.autohotkey.com/boards/viewtopic.php?t=68681 seemed to report a similar issue with Firefox, a few years back. I'm not sure that AHK has a proper issue tracker that we can use to try and pin this down though...

@zadjii-msft commented on GitHub (Mar 12, 2023): This thread: https://www.autohotkey.com/boards/viewtopic.php?t=68681 seemed to report a similar issue with Firefox, a few years back. I'm not sure that AHK has a proper issue tracker that we can use to try and pin this down though...
Author
Owner

@bzzrak commented on GitHub (Mar 13, 2023):

Works fine for me. Are you sure you're not running terminal as admin or something like that?

@bzzrak commented on GitHub (Mar 13, 2023): Works fine for me. Are you sure you're not running terminal as admin or something like that?
Author
Owner

@willxie commented on GitHub (Mar 13, 2023):

Oh yes I am running terminal as admin and usually with WSL2. Are the specific behaviors related to this?

@willxie commented on GitHub (Mar 13, 2023): Oh yes I am running terminal as admin and usually with WSL2. Are the specific behaviors related to this?
Author
Owner

@willxie commented on GitHub (Mar 14, 2023):

After disabling admin privilege from ubuntu shell, I can confirm that this behavior is fixed and behaved as normal. Though, I am still wondering why enabling admin privilege terminal shell does not allow AHK shortcuts to be used.

@willxie commented on GitHub (Mar 14, 2023): After disabling admin privilege from ubuntu shell, I can confirm that this behavior is fixed and behaved as normal. Though, I am still wondering why enabling admin privilege terminal shell does not allow AHK shortcuts to be used.
Author
Owner

@zadjii-msft commented on GitHub (Mar 14, 2023):

I am still wondering why enabling admin privilege terminal shell does not allow AHK shortcuts to be used.

I suspect that is because AHK itself is not running as admin. Processes cannot send window messages (keystrokes) to windows that are running at a different elevation level. Otherwise, an unelevated malicious.exe could just send keystrokes to any elevated console/terminal window, which would be a trivial escalation of privilege.

Glad we figured this one out!

@zadjii-msft commented on GitHub (Mar 14, 2023): > I am still wondering why enabling admin privilege terminal shell does not allow AHK shortcuts to be used. I suspect that is because AHK itself is not running as admin. Processes cannot send window messages (keystrokes) to windows that are running at a different elevation level. Otherwise, an unelevated `malicious.exe` could just send keystrokes to any elevated console/terminal window, which would be a trivial escalation of privilege. Glad we figured this one out!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19519