4 ms·
With the Compose Key, which is a feature of all linux distributions: compose + a + e = æ compose + o + / = ø compose + a + o = å https://en.wikipedia.org/wi
by fao_ 5y ago
With the Compose Key, which is a feature of all linux distributions:
compose + a + e = æ
compose + o + / = ø
compose + a + o = å
https://en.wikipedia.org/wiki/Compose_key https://en.wikipedia.org/wiki/Compose_key
Something I find absolutely criminal is that this hasn't taken off in a broader sense, and that most users memorize the unicode terms for characters like ©, rather than just typing a simple, eminently memorable sequence like (compose + o + c)
- mkl 5y agoA feature of only some keyboard layouts though? Ordinary US layout doesn't seem to have a compose key mapped by default.
- CRConrad 5y agoI was thinking they meant "in Emacs" or "on a Macintosh" or something.
- fao_ 5y agoIt takes two seconds to map using Gnome Tweaks or something else (Usually XModMap). I map it to right alt which is usually AltGr and not used anyway, and it performs superior to AltGr
- CRConrad 5y agoWorks for Anglophones. For the rest of us, who have some keys on the right (near the Enter key) occupied by Å, Ä, Ö or similar, we need Alt-Gr to get curly and square brackets, backslash, etc.
- Moru 5y agoYes, I was so sad when I "upgraded" from Atari to Windows and I could no longer do this. That it's still not standard is a mystery. It wasn't standard on Atari either but that it even was a thing 30 odd years ago shows yet again that we're not always as innovative as we think.
- __d 5y agoYou might find http://wincompose.info/ http://wincompose.info/ helpful: it adds this functionality to Windows.
- Moru 5y agoThankyou! I wonder if there is some patent stopping this from being included in windows by default...
- hackmiester 5y agoMicrosoft Word does have compose, sort of(?). control+apostrophe followed by e results in é, for instance. I have no idea why it isn’t OS wide. It works some other places, but not all.
- _carbyau_ 5y agoWindows most everywhere: Hold ALT while typing the Extended ASCII number for a character on the numpad (not the row of numbers above the letters) results in that char. For é: Hold Alt while typing 130 on numpad. TIL, apparently this can be extended to unicode too. https://superuser.com/questions/1024948/windows-10-alt-code-results-in-wrong-character https://superuser.com/questions/1024948/windows-10-alt-code-...
- sudobash1 5y agoVim uses something similar to this which it calls digraphs (see :help digraph). http://vimdoc.sourceforge.net/htmldoc/digraph.html http://vimdoc.sourceforge.net/htmldoc/digraph.html Ctrl+k a e = æ
- randlet 5y agoTIL. Thanks. I love how I keep learning new things about vim after years of daily usage.
- sundarurfriend 5y agoYou can also add your own digraphs. I've used this to make entering emojis easier, for eg. execute 'digraph :) 128578' so that Ctrl-K :) in insert mode inserts . (`execute 'digraph :\| 128528'` => , `execute 'digraph /\ 128591' ` => , etc.) Edit: I guess HN strips emojis from comments? Just try these and find out which ones they are, I guess! This was before I knew that the Julia plugin allows emoji entry too (\:<Tab>), but I still find this more convenient for the common ones because the names of emoji are all over the place.
- tomxor 5y agoRelevant excerpt for those wondering what "every Linux distro" means more specifically (xorg): > On Xorg the default Compose Key is ⇧ Shift+AltGr [...] The X keyboard driver does not allow the key used for Compose to also function as a modifier. Which might explain why my altgr doesn't seem to work when I try it since it's mapped to mod in i3.
- fao_ 5y agoWayland uses XKB, as does everything else under the sun. XKB is the layer that implements the Compose Key (Actually, you need to configure it via XKB because other methods like ibus do not bother reading ~/.XCompose which allows you to set your own custom compose sequences)