Ctrl-P is not recieved in vim #13762

Closed
opened 2026-01-31 03:51:26 +00:00 by claunia · 5 comments
Owner

Originally created by @BrotifyPacha on GitHub (May 9, 2021).

Windows Terminal version (or Windows build number)

1.7.1033.0

Other Software

NVIM v0.5.0-dev+1256-gd19348923

Steps to reproduce

  • Open vim
  • Bind something to ctrl-p : :nmap <Ctrl-p> :echo "Ctrl P triggered"
  • Press Ctrl-P

Expected Behavior

Expecting to see "Ctrl P triggered" message

Actual Behavior

Nothing is shown

Originally created by @BrotifyPacha on GitHub (May 9, 2021). ### Windows Terminal version (or Windows build number) 1.7.1033.0 ### Other Software NVIM v0.5.0-dev+1256-gd19348923 ### Steps to reproduce - Open vim - Bind something to ctrl-p : ```:nmap <Ctrl-p> :echo "Ctrl P triggered"``` - Press Ctrl-P ### Expected Behavior Expecting to see "Ctrl P triggered" message ### Actual Behavior Nothing is shown
Author
Owner

@BrotifyPacha commented on GitHub (May 9, 2021):

Tried unbinding it via

{
    "command": "unbound",
    "keys": "ctrl+p"
}

With no luck

@BrotifyPacha commented on GitHub (May 9, 2021): Tried unbinding it via ``` { "command": "unbound", "keys": "ctrl+p" } ``` With no luck
Author
Owner

@zadjii-msft commented on GitHub (May 11, 2021):

Are you running nvim via WSL? If so, could you run showkey -a, then type ctrl+p, and paste the output? It should look something like

zadjii@migrie-slaptop:~$ showkey -a

Press any keys - Ctrl-D will terminate this program

^P       16 0020 0x10

@zadjii-msft commented on GitHub (May 11, 2021): Are you running nvim via WSL? If so, could you run `showkey -a`, then type <kbd>ctrl+p</kbd>, and paste the output? It should look something like ``` zadjii@migrie-slaptop:~$ showkey -a Press any keys - Ctrl-D will terminate this program ^P 16 0020 0x10 ```
Author
Owner

@BrotifyPacha commented on GitHub (May 12, 2021):

Thanks a lot! TLDR; It has nothing to do with Windows Terminal.

I had an extension in my browser that blocks desired key mappings. I configured it to block Ctrl-P and Ctrl-W, so when my vim reflexes poped up, i wouldn't close any tab or start printing it.

For some unknown reason extension also captured said keystrokes when browser was minimized.

I'm very sorry for bothering, thanks for suggested method of debugging it via wsl. The moment i pressed Ctrl-P and saw no keycode was exactly what made my brain click.

@BrotifyPacha commented on GitHub (May 12, 2021): Thanks a lot! TLDR; It has nothing to do with Windows Terminal. I had an extension in my browser that blocks desired key mappings. I configured it to block `Ctrl-P` and `Ctrl-W`, so when my vim reflexes poped up, i wouldn't close any tab or start printing it. For some unknown reason extension also captured said keystrokes when browser was minimized. I'm very sorry for bothering, thanks for suggested method of debugging it via wsl. The moment i pressed `Ctrl-P` and saw no keycode was exactly what made my brain click.
Author
Owner

@zadjii-msft commented on GitHub (May 12, 2021):

Glad you were able to figure it out!

<off topic>

For some unknown reason extension also captured said keystrokes when browser was minimized.

wow that sounds dangerous. Imagine if a malicious extension globally bound all keys, but then sent them through as if nothing happened. It could install itself as a global keylogger 😨

@zadjii-msft commented on GitHub (May 12, 2021): Glad you were able to figure it out! \<off topic> > For some unknown reason extension also captured said keystrokes when browser was minimized. wow that sounds dangerous. Imagine if a malicious extension globally bound all keys, but then sent them through as if nothing happened. It could install itself as a global keylogger 😨
Author
Owner

@BrotifyPacha commented on GitHub (May 12, 2021):

Yeah, that sounds ominous. Will make an issue in Brave repo, maybe that's unintentional behavior.

@BrotifyPacha commented on GitHub (May 12, 2021): Yeah, that sounds ominous. Will make an issue in Brave repo, maybe that's unintentional behavior.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13762