[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature request, shift-enter to inline a newline
From: |
Seth David Schoen |
Subject: |
Re: feature request, shift-enter to inline a newline |
Date: |
Thu, 3 Feb 2022 11:08:32 -0800 |
Alex fxmbsw7 Ratchev writes:
> as title says, pressing shift enter would produce a newline into all
> instead of send the cmd away
I don't think there's currently a standard way to detect shift-enter and
distinguish it from regular entire in a terminal.
The terminal interface gives applications sequences of individual bytes
rather than (in most cases) keypress events. So for example, a terminal
application doesn't know whether "A" resulted from shift-a or from caps
lock being on when a was pressed. Nor can it detect bare shift-key
presses.
There are some extensions to this interface with ioctl calls but a
challenge there is that they are potentially not portable between
operating systems, so you could get features that can only be
implemented on one OS and not others.
It seems like there are workarounds where terminal emulators can
generate escape sequences to distinguish these
https://unix.stackexchange.com/questions/536352/ctrl-enter-shift-enter-and-enter-are-interpreted-as-the-same-key
so maybe one of those is popular or semi-standard enough that an
application like bash could consider treating it specially?
- feature request, shift-enter to inline a newline, Alex fxmbsw7 Ratchev, 2022/02/03
- Re: feature request, shift-enter to inline a newline, Greg Wooledge, 2022/02/03
- Re: feature request, shift-enter to inline a newline, Kerin Millar, 2022/02/03
- Re: feature request, shift-enter to inline a newline,
Seth David Schoen <=
- Re: feature request, shift-enter to inline a newline, Chet Ramey, 2022/02/03
- Re: feature request, shift-enter to inline a newline, Dennis Williamson, 2022/02/03