Hacker News new | past | comments | ask | show | jobs | submit login

Great! Linux, I assume? goes looking OK yep, I'll enable it and start re-training myself on that, for when I'm not on mac. It's not quite as quick for most of the things I need frequently, but seems tolerable.

Remaining questions: 1) why would the default be bad? Like, why ever would one make a default bad if there are non-bad options? Especially for something everyone should want to be good on a computer, like composing text in the user's language, and 2) ugh of course even once enabled the default compose key is bad (there's a theme here) and both enabling it and configuring it depends on which WM/DE you're in, Wayland vs. Xorg, and so on, and from some googling it's even possible to run into inconsistent behavior between different friggin' GUI toolkits under the same DE.

OK that second one is a comment, not a question. Still.

I'd recently googled the problem of (specifically) typing an em-dash on Linux, and just tried it again, and sure enough this solution doesn't come up until the sixth hit, in an unassuming Google documentation style guide. "Just memorize a 4-digit number" is the overwhelming answer to that question, on search engines, for some reason, despite plainly being awful. Maybe the configuration hurdle and bad default behavior is why that's the go-to solution, I dunno.

[EDIT] none of the above irritation aimed at you, I hope is clear, and sincerely, thanks for the pointer.




1) why would the default be bad? Like, why ever would one make a default bad if there are non-bad options?

Because it is not bad, it just chooses different advantages and disadvantages.

Right Alt could be configured to do regular Alt modifier, or could be configured to enter additional characters (Alt Gr - third/fourth level).

The first case has advantage that Alt-based keyboard shortcuts on right side can be conveniently entered by one hand. That is why there are Shift, Control and Alt on both sides of keyboard.

Second case has advantage that you can enter more characters, but entering rightside Alt-based shortcuts is more awkward.

Conventionally, US keyboard uses the first approach (as there are less need for entering more characters), while many non-US keyboards use the second approach.

Also, why Compose key is not accessible by default? Because there is no Compose key on common PC keyboard (in constrast to some old Unix keyboards). Therefore, Compose key need to 'steal' some existing key, which is problematic, because users expect existing keys to work as expected. I personally use Menu key as Compose key, but other users may have different expectations.


I imagine it defaults to off and the top results recommend the Control-Shift-U<Unicode codepoint> because otherwise people switching from Windows would complain. It’s my understanding that on Windows typing these characters involves holding down Alt while typing arbitrary Windows-specific numbers on your number pad (What happens if you don’t have one? I’ve no idea!) — or more intuitively, opening a new browser tab, Googling the name of the character, copying it with a keyboard shortcut or context menu (I hate leaving X11 and not being able to simply highlight text and middle click to paste!), and pasting.

All distros I've seen allow you to choose a keyboard layout (and I think at least usually AltGr) at first boot, and I imagine this is how most people using primarily non-English type quickly, on any OS. I personally just use a little WM/DE agnostic script to make capslock useful and add a Compose key:

    #!/bin/sh
    setxkbmap -option caps:super
    xcape -e 'Super_L=Escape'
    setxkbmap -option compose:sclk
... and ‘xcape -e 'Shift_L=Multi_key'’ to make tapping Shift work as Compose (xcape is installed by a little bootstrapping script I run when I clone my dotfile repo). But this is better for me because I mostly use Compose for little things like curling my apostraphes (Compose + < or > + ' or " → ‘,’,“, or ”), not so many characters that it needs to be perfectly fast. I don’t have a monitor set-up that’s nonstandard in anything but aspect ratio, or use native apps I don’t trust (like Snaps), so I’ve never had a use for Wayland.

[EDIT] No problem, you’re welcome!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: