intersystems-community / vscode-objectscript

InterSystems ObjectScript extension for Visual Studio Code
https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO
Other
108 stars 49 forks source link

webSocketTerminal: add support for home + end keys in line recall #1281

Closed EnricoParisi closed 11 months ago

EnricoParisi commented 11 months ago

I'm using/testing the new webSocketTerminal and I noticed that when I use the line recall (up arrow key) the home and end keys are not implemented when editing a line. Looking at the code, cursor home (Move the cursor to the beginning of the line) is mapped to ctrl+A. Interestingly cursor end (Move the cursor to the end of the line) is ctrl+E in webSocketTerminal, however in my default installation of vscode (Windows) ctrl+E trigger the vscode search file.

Implementing home + end keys should be trivial, the corresponding keys are: home: "\x1b\x5b\x48" end: "\x1b\x5b\x46"

Then is just a matter to add two additional "case:" in addition to keys.ctrlA and keys.ctrlE.

isc-bsaviano commented 11 months ago

@EnricoParisi Thanks for trying this feature out! I like this suggestion.