Terminal: Add keybinding: something like moveCursorLeft, moveCursorRight

Created on 5 Dec 2019  路  3Comments  路  Source: microsoft/terminal

Description of the new feature/enhancement


Ctrl+F/X/N/P etc. work in the wt by default (like emacs keybindings). However, Ctrl+B didn't work, and there is no property which can set keybindings for cursor moving.

Proposed technical implementation details (optional)


I'm not sure this feature can easily be implemented, for example, by modifying AppKeyBindingsSerialization.cpp, but I think there's many users familiar with emacs keybindings (including me).

Issue-Feature Needs-Tag-Fix

Most helpful comment

Cursor movement is the responsibility of the shell you are using. If that shell is PowerShell, use the PSReadline options to set up those motions. If you鈥檙e using bash, configure your inputrc. If you鈥檙e using zsh, use bindkey. If you鈥檙e using cmd, we aren鈥檛 going to add those bindings (sorry.)

All 3 comments

Cursor movement is the responsibility of the shell you are using. If that shell is PowerShell, use the PSReadline options to set up those motions. If you鈥檙e using bash, configure your inputrc. If you鈥檙e using zsh, use bindkey. If you鈥檙e using cmd, we aren鈥檛 going to add those bindings (sorry.)

I'm using zsh(wsl).
Executing bindkey command, The output was
......
"^B" backward-char
......
and Ctrl+B still didn't work. Ctrl+B did work if I use FluentTerminal as a terminal emulator, so I thought wt could be responsible for that.

@Sopharizer I was able to achieve this by setting PSReadline edit mode option and saving that to a configuration file.

Was this page helpful?
0 / 5 - 0 ratings