Enable Reverse Search in Visual Studio Code Terminal

Ctrl+R in the VS Code Terminal doesn't trigger the reverse-i-search function the way its supposed to in a normal terminal session.

To enable it, follow the steps below:

  1. Open VS Code
  2. Open the Command Palette using Ctrl + Shift + P, select Preferences: Open Keyboard Shortcuts (JSON)
  3. Add the following code to the JSON array in the file:
{
  "key": "ctrl+r",
  "command": "workbench.action.terminal.sendSequence",
  "args": { "text": "\u0012" },
  "when": "terminalFocus"
}
vs-code: unable to reverse search on built-in terminal
When I do ^R on the terminal to reverse search, I get the following: (^R) was pressed. Waiting for second key of chord... How do I fix this? I’m on OS X.