3 ms·
Very cool! What keys do ~ and ^ represent? { "^w" = "deleteWordBackward:"; "~f" = "moveWordForward:"; "~b" = "moveWordBackward:";
by bloopernova 4y ago
Very cool!
What keys do ~ and ^ represent?
{
"^w" = "deleteWordBackward:";
"~f" = "moveWordForward:";
"~b" = "moveWordBackward:";
"~d" = "deleteWordForward:";
"~<" = "moveToBeginningOfDocument:";
"~>" = "moveToEndOfDocument:";
"~w" = "copy:";
"^y" = "yank:";
"^t" = "transpose:";
"^p" = "moveUp:";
"^n" = "moveDown:";
"^u" = "deleteToBeginningOfLine:";
}
- beembeem 4y agoIf it's anything like readline/Emacs, then: ^ = Control ~ = Escape
- alexdme 4y agoIn this file `~` is meta (option key on macs). Not sure why it's not escape like it is in emacs.
- dotancohen 4y agoOn Linux, Meta is activated on modern keyboards by both ESC and ALT.
- Jtsummers 4y agoAlso on macOS and (at least within emacs) Windows.
- a1369209993 4y agoBecause on a particular three/four-decade-old physical terminal[0], Alt-$KEY was transmitted as "1B [sequence for $KEY]". Eg, Alt-X was "1B 58"[1]. The escape key happened to also transmit "1B" on its own. Consequently, "Alt-$KEY" and "Esc, $KEY" were indistinguishable unless you went out of your way to engineer a race condition. This has never really been fixed, despite intermittent attempts. 0: I think VT100, but don't quote me on that 1: or possibly "1B 78", depending on how it handled shift; I don't remember exactly.