ASCII or Unicode? (was best text editor for programming Python on a Mac)
On 06/19/2016 08:29 PM, Steven D'Aprano wrote:
> On Mon, 20 Jun 2016 12:07 pm, Rustom Mody wrote:
> In theory most Linux apps support an X mechanism for inserting characters
> that don't appear on the keyboard. Unfortunately, this gives no feedback
> when you get it wrong, and discoverablity is terrible. It's taken me many
> years to discover and learn the following:
> WIN o WIN o gives ?
> WIN m WIN u gives ?
> WIN s WIN s gives ?
> WIN . . gives ?
> (WIN is the Windows key)
> Getting back to ? I tried:
> WIN = WIN /
> WIN / WIN =
> WIN < WIN >
> WIN ! WIN =
> etc none of which do anything.
> Another example of missing tooling is the lack of a good keyboard
> application. Back in the 1980s, Apple Macs had a desk accessory that didn't
> just simulate the keyboard, but showed what characters were available. If
> you held down the Option key, the on-screen keyboard would display the
> characters each key would insert. This increased discoverability and made
> it practical for Hypertalk to accept non-ASCII synonyms such as
> ? for <=
> ? for >=
> ? for <>
> Without better tooling and more discoverability, non-ASCII characters as
> syntax are an anti-feature.
It sounds like you are almost, but not quite, describing the Linux Compose key. To get many of
the 'special' characters, you first press the compose key and follow it with (usually) two
characters. (That's ONE press of the compose key, not two like your first examples.) And yes,
the unequal sign is <compose> =/
Here are some more examples (I'm not going to specify the <Compose> key here, just assume these
examples are prefixed with it): These are all pretty easy to remember.
German umlauts a" o" u" give ? ? ? (or use uppercase)
Spanish e?a (spelling?) and punctuations: n~ ?? !! --> ? ? ?
French accents: e' e` e^ c, --> ? ? ? ?
Money: c= l- y- c/ --> ? ? ? ?
Math: =/ -: +- xx <= >= --> ? ? ? ? ? ?
Superscripts: ^0 ^1 ^2 ^3 --> ? ? ? ?
Simple fractions: 12 13 ... 78 --> ? ? ... ?
Here's a cute one: CCCP --> ? (hammer & sickle)
And like your first examples: oo mu ss --> ? ? ?
Many MANY more obscure codes as well (have to look them up, or make a copy of this info.)
Admittedly not much use in programming, but can be useful for other general text.
Now, setting the compose key... Easy (but obscure) in Mint Linux (and I think Ubuntu is the
same. I don't know about other distros.):
From the menu, select Preferences->Keyboard->Layouts->Options->Position of Compose Key
This opens a list of checkboxes with about a dozen choices -- select whatever you want (I use
the Menu key).
-=- Larry -=-