spent some time today working on this diagram of how the ASCII control characters work in unix
there are a lot of mistakes/missing nuance but I think it's really interesting how little structure there is. Special codes (like `3` for SIGINT) that are handled by the OS are mixed with just regular keypresses (like `13` for "enter”) which are mixed with codes that are handled by the application (like `1` for Ctrl-A in readline)
(not looking for history lessons right now)
@b0rk This may be a silly question, but how do some of these key combinations work with different keyboard layouts? For example, on a Swedish (mac) layout, the @-symbol is alt-gr-2; Do you type ctrl-alt-gr-2 to get the null character?
@b0rk You are doing god's work. Thank you.
@b0rk For me, CTRL-U is "oops I messed up typing my password let me try again". Where CTRL-K is "kill from cursor to end of line", CTRL-U is "kill entire line".
This is really useful for password entry fields where you don't get stars or any other indication you've typed anything, so you don't know where your cursor is.
But, with anything involving shells or terminals, it's complicated. Apparently BASH and some other things think CTRL-U is "kill from cursor to beginning of line" and many other shells including ZSH think it's "kill entire line". I don't actually know what interpretation is in charge in a password entry field... but I still mash CTRL-U when I know I mistyped something.
@b0rk For me, CTRL-U is "oops I messed up typing my password let me try again". Where CTRL-K is "kill from cursor to end of line", CTRL-U is "kill entire line".
This is really useful for password entry fields where you don't get stars or any other indication you've typed anything, so you don't know where your cursor is.