Nope. I use left shift for everything.
Even if you do use both shift keys correctly, it still feels awkward to me since you have to sacrifice a pinky from home row and shift your hands.
It’s why I’ve been curious to try a layout where Shift and Alt are swapped, that way you can use your thumb to press shift and keep your fingers in place.
Ohh I gotcha. Honestly no sweat, its kind of just a bit of fun trivia really :)
Interesting, I have not heard of these terms before. Thanks for sharing!
I think this adds the bit of nuance that was bugging me: using something like ncurses or vim, presumably when you press a key like ctrl-z or ctrl-d it actually sends the character to the app. It would feel a bit silly if the terminal intercepted the ctrl-d, flushed some buffer, and the program had to reverse engineer whether you pressed ctrl-d or enter or something.
For raw mode, I assume the app asks the tty to please forward some characters to the app. Otherwise, in the default cooked mode, the tty intercepts those control characters to call certain functions. I suppose some REPLs may choose to emulate a cooked mode on top of raw mode, and so they have to handle the \x04 in the same way a tty would to keep it functioning like the user expects. I believe readline
does something like this, which is why you had to use bash --noediting
for ctrl-d to run the command. Good food for thought :)
I also have to say, naming it “cooked mode” is extremely funny as gen z. I love that
$ cat
You sound very nice :)
You sound very nice :)
Bye<ctl-d>Bye
Oh wait, and cool too
Oh wait, and cool too
<ctl-d>
$
The Ctl-D didn’t end the file when i typed “Bye” :( it only worked when I pressed Ctl-D on its own line. So how does cat know that it should ignore the EOF character if there is some text that comes before it?
What Ctl-D does is flush the input to the program, and the program sees how big that input is. If the length of the input is 0 that is interpreted as EOF. So Ctl-D is like Enter because they both flush the input, but Ctl-D is unlike Enter because it does not append a newline before flushing, and as a consequence you can send empty input (aka an EOF “character”) with Ctl-D.
not true. try this:
$ date<C-d>
bash did not terminate stdin, because when i press enter it still runs the command, and my shell continues to work as normal!
you can also try this:
$ bash --noediting
$ date<C-d><C-d>
and it will print the date.
so something else is happening here! thats what the link talks about in detail
Thats a good observation. I would think I use Ctrl more frequently than Alt, so it would make sense to have Alt where Ctrl usually is, and Ctrl where Shift usually is.