Failed to handle key `j`: Failed to handle key `<Esc>`: e.toLocaleUpperCase is not a function
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
VSCodeVim version: 1.22.2
Stack trace
TypeError: Failed to handle key `j`: Failed to handle key `<Esc>`: e.toLocaleUpperCase is not a function
at Function.IsControlKey (/home/minghui/.vscode/extensions/vscodevim.vim-1.22.2/src/configuration/notation.ts:31:15)
at Function.CompareKeypressSequence (/home/minghui/.vscode/extensions/vscodevim.vim-1.22.2/src/actions/base.ts:138:54)
at _.doesActionApply (/home/minghui/.vscode/extensions/vscodevim.vim-1.22.2/src/actions/base.ts:76:18)
at getRelevantAction (/home/minghui/.vscode/extensions/vscodevim.vim-1.22.2/src/actions/base.ts:277:16)
at j.handleKeyAsAnAction (/home/minghui/.vscode/extensions/vscodevim.vim-1.22.2/src/mode/modeHandler.ts:578:20)
at j.handleKeyEvent (/home/minghui/.vscode/extensions/vscodevim.vim-1.22.2/src/mode/modeHandler.ts:478:40)
at runMicrotasks (<anonymous>)
at process.keys (internal/process/task_queues.js:93:5)
at j.handleMultipleKeyEvents (/home/minghui/.vscode/extensions/vscodevim.vim-1.22.2/src/mode/modeHandler.ts:371:23)
at f.handleRemapping (/home/minghui/.vscode/extensions/vscodevim.vim-1.22.2/src/configuration/remapper.ts:483:73)
at f.sendKey (/home/minghui/.vscode/extensions/vscodevim.vim-1.22.2/src/configuration/remapper.ts:367:42)
at t.Remappers.handledAsRemap [as sendKey] (/home/minghui/.vscode/extensions/vscodevim.vim-1.22.2/src/configuration/remapper.ts:39:7)
at j.text [as handleKeyEvent] (/home/minghui/.vscode/extensions/vscodevim.vim-1.22.2/src/mode/modeHandler.ts:459:9)
at /home/minghui/.vscode/extensions/vscodevim.vim-1.22.2/extensionBase.ts:359:73
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/configuration/notation.ts at IsControlKey, then follow the call from src/actions/base.ts:138 through key handling for j and . Reproduce the reported sequence and confirm that it no longer raises the e.toLocaleUpperCase TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100