VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.75k stars 1.31k forks source link

Cannot type capital letters in Insert mode #6094

Open osa1 opened 3 years ago

osa1 commented 3 years ago

I'm sure this is a bad configuration or some interaction with another plugin, but I can't figure it out, and GitHub discussions is not enabled on this repo, so submitting a bug report.

Describe the bug Can't use shift in insert mode to enter uppercase letters.

To Reproduce Open any file with, switch to insert mode, try to enter uppercase letters. Some of the keys work, but for example shift-d or shift-i don't work.

Expected behavior Shift + letters should work in insert mode, insert an uppercase letter.

Environment (please complete the following information):

Additional context Full config:

{
    "telemetry.enableCrashReporter": false,
    "telemetry.enableTelemetry": false,
    "editor.fontFamily": "'Jetbrains Mono Medium'",
    "workbench.colorTheme": "Gray Matter Dark",
    "files.watcherExclude": {
        "**/target/**": true
    },
    "editor.lineNumbers": "off",
    "window.zoomLevel": 1,
    "editor.cursorBlinking": "solid",
    "editor.cursorStyle": "block",
    "breadcrumbs.enabled": true,
    "vim.leader": ",",
    "vim.useCtrlKeys": true,
    "vim.handleKeys": {
        "<C-f>": false,
        "<C-]>": false,
        "<C-[>": false,
        "<C-b>": false,
        "<C-k>": false,
    },
    "vim.insertModeKeyBindings": [
        {
            "before": [
                "j",
                "k"
            ],
            "after": [
                "<Esc>"
            ]
        },
        {
            "before": [
                "k",
                "j"
            ],
            "after": [
                "<Esc>"
            ]
        }
    ],
    "vim.normalModeKeyBindings": [
        {
            "before": [
                "H"
            ],
            "after": [
                "^"
            ]
        },
        {
            "before": [
                "L"
            ],
            "after": [
                "$"
            ]
        },
        {
            "before": [
                "Space"
            ],
            "after": [
                "O",
                "<Esc>"
            ]
        },
        {
            "before": [
                "Enter"
            ],
            "after": [
                "o",
                "<Esc>"
            ]
        }
    ],
    "vim.visualModeKeyBindings": [
        {
            "before": [
                "H"
            ],
            "after": [
                "^"
            ]
        },
        {
            "before": [
                "L"
            ],
            "after": [
                "$"
            ]
        },
    ],
    "editor.renderLineHighlight": "none",
    "editor.renderIndentGuides": false,
    "files.autoSave": "afterDelay",
    "gitlens.blame.ignoreWhitespace": true,
    "editor.minimap.enabled": false,
    "scm.diffDecorations": "gutter",
    "C_Cpp.updateChannel": "Insiders",
    "[rust]": {
        "editor.defaultFormatter": "matklad.rust-analyzer"
    },
    "gitlens.advanced.repositorySearchDepth": 2,
    "editor.wordWrapColumn": 100,
    "vim.textwidth": 100,
    "terminal.integrated.fontSize": 13,
    "editor.semanticHighlighting.enabled": true,
    "rust-analyzer.cargo.allFeatures": false,
    "rust-analyzer.checkOnSave.allFeatures": false,
    "editor.fontLigatures": true,
    "debug.console.fontSize": 13,
    "extensions.ignoreRecommendations": true,
    "editor.fontSize": 13,
    "search.useGlobalIgnoreFiles": true,
    "editor.renderWhitespace": "none",
    "editor.find.cursorMoveOnType": false,
    "editor.tokenColorCustomizations": {
        "[Solarized Light]": {
            "variables": "#002b36",
            "functions": "#002b36",
        },
        "[Gray Matter Dark]": {
            "comments": "#969caf"
        },
        "[Gray Matter Light]": {
            "comments": "#969caf"
        }
    },
    "editor.semanticTokenColorCustomizations": {
        "[Solarized Light]": {
            "enabled": true,
        },
        "[Gray Matter Dark]": {
            "enabled": false,
        }
    },
    "workbench.colorCustomizations": {
        "[Gray Matter Dark]": {
            "editor.background": "#282a36",
            "sideBar.background": "#282a36",
        }
    },
    "workbench.iconTheme": "vs-seti",
}
J-Fields commented 2 years ago

Very weird. Can you still reproduce?

miguelangeltorresfp commented 2 years ago

I have the same problem but only with the letter k. If I press shift + k in insert mode it doesn't do anything.

And with this mapping it doesn't work either. I mean, I can't use shift + k in any mode.

"vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["J"],
      "after": ["5", "j"]
    },
    {
      "before": ["K"],
      "after": ["5", "k"]
    },
  ],
g-omahony commented 2 years ago

I have the same issue as Miguel above. I cannot use shift + k in any mode. weird...

baezanat commented 2 years ago

Sorry, my issue is with Vim but not with vscode; I'm not sure how to delete this comment.

rafaeloledo commented 1 year ago

In my case i mapped <S-x> where x is hjkl, changed to <A-x>

Prathamesh-Chavan-232 commented 1 year ago

Sorry, my issue is with Vim but not with vscode; I'm not sure how to delete this comment.

Same Issue here shift+k doesn't work in mode, even after disabling vim extension

anshulspider commented 8 months ago

in my case its shift + c which dosen't produce "C" but puts the vscode to visual mode

Zetaniis commented 6 months ago

For me, the shift K wasn't working in insert mode, vim search and vim command line mode. I fixed it by editing the keybindings.json file by adding mode exceptions in the "when" property of shift-k key.

    {
        "key": "shift+k",
        "command": "editor.action.showHover",
        "when": "editorTextFocus && vim.mode != 'Insert' && vim.mode != 'CommandlineInProgress' && vim.mode != 'SearchInProgressMode'"
    },
scottstensland commented 3 months ago

cannot enter capital N

This vim extension ( vscodevim ) obviously should recognize when its in insert mode and auto disable all non vim keybindings until user hits ESC to return back to command mode

when I am editing code then enter letter N even when in vim insert mode vscode opens up a new vscode window ... showstopper bug

I know vi however am new to vscode so this bug is ongoing

related issue ... when editing code right click to display available commands like COPY and PASTE show normal ctrl-C and ctrl-V however those keybindings are not correct ... so vscode needs to make itself savvy to current keybindings so it displays correct keys on that right click command listing

PhenomenaPh commented 3 weeks ago

Cant type upper X and K