Hacker News new | ask | show | jobs
by grincho 2445 days ago
The Mac has provided easy access to symbols since 1984, with nice mnemonics like these:

    option-=  ≠
    option-<  ≤
    option->  ≥
    option-/  ÷
    option-o  ø
    option-w  ∑
I don't know why other OSes haven't adopted something similar. The first couple of these were even idiomatic in HyperCard's scripting language.
5 comments

That's like visual puns, and is limited to whatever symbols seemed important to the developer at the time.

How do you discover how to type ß, °, «, ‡ etc?

Android's gboard uses phonetics (long press [s] key for ß), symbolic similarity (long press [*] key for ‡) and visual similarity (long press [<] key for «) which is guessable for some symbols, but isn't discoverable for others (you can search for emoji by name, but not symbols).

The Mac has had, as a standard feature for decades, an on-screen keyboard to allow you to explore the results of different key combinations. It’s a great tool.
I should note that, alongside it, is a useful search tool that allows you to find the character you’re looking for if you’d rather just search and don’t care to learn the key combination (if there is one).
Cool! Where do I find it?
In Mojave, and it’s pretty similar across versions IIRC: open keyboard preferences in system settings and check the “Show keyboard and emoji viewers in menu bar” box.

That will replace the language flag icon in your top bar with an odd icon with the command key embedded.

The second option in that menu is the keyboard viewer. You can show that and drag on a corner to make it as large as you want. Dynamically changes the keyboard as you hold down modifier keys.

It's easy on the Mac to have a custom or purpose-built keyboard layout that makes sense for the user or context. It's a little harder with X (mostly due to uncoöperative DEs) but still doable.
Self-reply for Kwpolska: Adding layouts to /usr/share/X11/xkb/symbols/ is straightforward (but is necessarily system-wide, and requires root), and I do that. However, for the popular desktop environments, it's like pulling teeth to have that layout treated as first-class with respect to switching and settings.

(On MacOS, putting a .layout file in ~/Library/Keyboard\ Layouts is enough.)

I've hacked /usr/share/X11/xkb/symbols/xx files to have custom keyboard layouts, DEs are not able to mess with it.
X has Compose, which originated slightly earlier (the key, that is, not the X11/xkb implementation), and is a tolerable alternative. e.g. [Compose / =] ↦ [≠]
> nice mnemonics like these:

> option-w ∑

This would grate on me every single time I had to use it. It's an S. Put it on option-s.

For context opt s is ß so the decision wouldn’t be easy if you want to include both.
What are á and à?

Putting double S on option-s just makes option-w for Sigma more grating. If they were going by shape, it'd be on option-b, which is equally stupid. But since it's on S, we can conclude that... someone at Apple knows German, but nobody can even name a Greek letter? That Germans are right and Greeks are wrong? What?

I don’t think it that extreme, but that German has higher precedence than Greek. If you need to include both characters, you have to pick one or the other, and for whatever reason this configuration happened. We might never know the true reason behind the decision, but stupility is unlikely the answer. Most seemingly stupid decisions (technical or otherwise) makes at least a certain amount of sense within its proper context, and it’s fair to talk down to it when you don’t have the risk of being judged by that decision.
Windows has a keyboard called US-International with extra symbols. Also, note that those key combinations might not exist in other keyboard layouts (replaced with local keys).
I like to use characters like those as custom operators whenever I can. :)