From pdalgd at gmail.com  Mon Feb 13 10:33:48 2017
From: pdalgd at gmail.com (peter dalgaard)
Date: Mon, 13 Feb 2017 10:33:48 +0100
Subject: [Rd] Pressing either Ctrl-\ of Ctrl-4 core dumps R
In-Reply-To: <CAFDcVCST0H=omid4eW1_VyapmAK1-rkGK=83rUvR6CmarNOeCw@mail.gmail.com>
References: <CAFDcVCR+SrkrVw8UBaUYrYdDjHOMJK-1tywkONLN5nRG2uVLeQ@mail.gmail.com>
	<alpine.LFD.2.20.1702101251520.6718@itasca.stat.uiowa.edu>
	<CAFDcVCST0H=omid4eW1_VyapmAK1-rkGK=83rUvR6CmarNOeCw@mail.gmail.com>
Message-ID: <296186FF-A0BE-4CC1-A0CA-C45FB997B298@gmail.com>


On 12 Feb 2017, at 23:54 , Henrik Bengtsson <henrik.bengtsson at gmail.com> wrote:

> I still don't understand why the terminal treats keypress Ctrl+4 the
> same as Ctrl+\, but at least I'm not alone;
> https://catern.com/posts/terminal_quirks.html#fn.3.

I would guess that this was just to get certain escape chars within reach on non-US keyboard layouts, e.g. the [\] characters are replaced by some permutation of the three extra letters in Scandinavian languages (as Henrik surely knows all about). So the awkward ones were reassigned/duplicated at Ctrl-2 -- Ctrl-8.

On, say, a current Mac Terminal.app, Ctrl-\ should be Ctrl-Shift-Alt-7, but that key combination actually just generates "7". I also recall terminals where some characters could only be obtained via compose sequences, e.g. compose-/-/ for "\", and there was no obvious way to add a Ctrl modifier to that.

-pd


-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



[Rd] Pressing either Ctrl-\ of Ctrl-4 core dumps R
peter dalgaard