Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Keyboard Cursors and SelectionsNew to Visual Studio Code? Get it now.
Keyboard Cursors and Selections

Keyboard Cursors and Selections

srares13

|
1,674 installs
| (3) | Free
Create arbitrary cursors and selections with the keyboard.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

In a nutshell

Place inactive cursors and selections

Create cursors and selections


And activate them on demand

And then activate them


Everything is done with two commands

  • Place inactive cursors and selections with KCS: Place Inactive Selection command.

  • Inactive cursors and selections are activated with KCS: Activate Selections command.

  • By default the commands are mapped to PageDown and PageUp respectively. If you need help in remapping them, check below.




Read more

Feedback

For questions, suggestions, issues, feel free to use the Issues section of the extension's repository.


If you want to remap the commands

  1. Open the Command Palette (Windows/Linux: Ctrl + Shift + P, Mac: Cmd + Shift + P).

  2. Search for and select Preferences: Open Keyboard Shortcuts.

  3. Once the Shortcuts tab is open, search for the desired command, for example Place Inactive Selection, double click on it and press the new key combination.


Other features

  • Placing multiple inactive cusors and selections at once is also supported

    Place multiple inactive selections at once


  • To remove all inactive cursors and selections, simply press Esc

  • If you place an inactive cursor or selection over another, the existing one will be removed

    Remove innactive selections


  • Undo-Redo system

    It registers all actions that have as effect placing or removing inactive cursors and selections. These can be undone or redone via two commands:

    • KCS: Undo

      Default mapping: Windows/Linux: alt + shift + z, Mac: option + shift + z.

    • KCS: Redo

      Default mapping: Windows/Linux: alt + shift + y, Mac: option + shift + y.

    Undo-Redo system


  • Experimental: Inactive cursors and selections react to document edits

    When you make edits to the document, the inacitve cursors and selections will move across the document in accordance with those edits.

    Inactive cursors and selections react to document edits

    This feature is also integrated with the Undo-Redo system, meaning that the undone or redone inactive cursors and selections will respect the new document edits.

    The "inactive cursors and selections react to document edits" feature is integrated with the Undo-Redo system. Example 1

    The "inactive cursors and selections react to document edits" feature is integrated with the Undo-Redo system. Example 2

    By default this feature is enabled. If you wish to disable this, it is found in VS Code Settings under the name Kcs: Inactive Selections React To Document Edits.

    Please report any issues you have about this experimental feature.


  • You can change the colors of the inactive cursors and selections

    1. Open the Command Palette (Windows/Linux: Ctrl+Shift+P, Mac: Cmd+Shift+P).

    2. Search for and select Preferences: Open Settingts (UI).

    3. Once the settings view is open, type "kcs" and options like Kcs: Cursor Color and Kcs: Selection Color will appear. Their value has to be given in hex code.


    • For developers who want to change these colors through their theme, this is an example of how you could do it:
      const configuration = vscode.workspace.getConfiguration('kcs')
      await configuration.update('cursorColor', '#ff0000', vscode.ConfigurationTarget.Global)
      await configuration.update('selectionColor', '#ff000099', vscode.ConfigurationTarget.Global)
      
      Note that you can use transparency, especially for the selection color.

Extension limitations

These extension's limitations are derived from the limitations of the VS Code Extension API itself, but they are handled to minimize as much as possible their inconvenience.

  • Inactive selections visuals

  • Uniquely identify editors with the same file


  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft