Closed Bellavene closed 1 year ago
I'm a little hesitant towards in-app copy/paste/selection for nchat, as it makes code/ui more complex, and the terminal (generally) already provides such functionality.
Note that one can use ctrl-u / ctrl-k to delete input buffer - similar to bash. Adding support for other common terminal text navigation (jumping) shortcuts would probably make sense though. Will try take a look at that.
Adding support for other common terminal text navigation (jumping) shortcuts would probably make sense though. Will try take a look at that.
With commit 0239998 improved support for text navigation/editing was implemented. nchat
should now support: Left
, Right
, Backspace
, Delete
, ^A
, ^E
, ^K
, ^U
, Alt-Left
, Alt-Right
, Alt-Backspace
, Alt-Delete
.
Regarding copy/paste I'll leave this issue open for now, until I've checked if some basic support can be added without too much complexity.
Clipboard (cut/copy/paste of text) support has been added in above commit. Default keybindings are alt-x, alt-c, alt-v. Please open a new issue if any bug is found.
Would be great to have native copy/paste support with pbcopy and pbpaste or similar on GNU systems. Also I see a need to use standard shortcuts like ctrl+A or alt+A to select all typed text, so you can delete all at once. And of course standard terminal behavior jumping text around, like alt+left or alt+shift+left, one word backwards and select one word backwards.