chrismorgan
last Saturday at 7:24 AM
As #10 on this list, hereās how I do it on my laptop.
I remap a key to the right of Space to Compose, and add various custom sequences. Before long, I was completely comfortably and casually typing dashes and curly quotes and more, and in fact it takes conscious effort for me to limit myself to ASCII when typing prose. (Writing code, writing *, /, -, ' and " is easy. But writing prose, I genuinely will write Ć, Ć· if it feels the right one in that place, ā, ā/ā and ā/ā.)
On one previous laptop keyboard I mapped Menu, on my current one RAlt is more suitable.
When on Windows, I use WinCompose. On Linux, I used to just use it bare, which had advantages and disadvantagesāapps implement a Compose key inconsistently, some messing things up related to includes and some handling overlapping sequences differently. More recently I wanted to be able to type Telugu and installed fcitx5 which is no longer mostly broken under Wayland like it was last time I tried, so now fcitx5 is handling the Compose sequences across the entire system, and working more consistently. Also I can use Ctrl+Alt+Shift+U and get a popup where I can search Unicode by code or description. Now if only that pesky popup would handle Shift+Space and Ctrl+Backspace itself rather than letting them fall through to the parentā¦
In my ~/.config/sway/config:
input * {
xkb_options "caps:backspace,compose:ralt"
}
(caps:backspace isnāt entirely relevant here, but itās on the same line and I choose to mention it. When people are remapping Caps Lock, Iāve never understood why so many seem to choose to make it Escape. Just extend the left hand and slap the corner of the keyboard with the ring finger, itās not a huge movement and is easy to reach and return.
Backspace, however, tends to be needed at least as often (and yes, I say that despite using Vim), and is much harder to hit. In my mind, a
far better candidate for shifting to that prime real estate.)
For my ~/.XCompose, I start with the defaults and one good set of additions, https://raw.githubusercontent.com/kragen/xcompose/master/dot...:
include "/usr/share/X11/locale/en_US.UTF-8/Compose"
include "/home/chris/.XCompose-kragen"
Then I add all kinds of additions. Lots of fine typography stuff like zero-width space and non-joiner, narrow no-break space, thin space⦠a few more hyphen/dash mappings⦠and lots of other things like nice emoji sequences, music notation stuff, Greek letters matching Vim digraphs, superscript ordinals (Ė¢įµ, āæįµ, ʳįµ, įµŹ°), the keyboard shortcut symbols macOS uses (āāā„ā§ā« and another dozen less common ones), control pictures like ā, and a handful of other things.
When allās said and done:
⢠Compose - - - gets me ā EM DASH (stock)
⢠Compose - - . gets me ā EN DASH (stock)
⢠Compose - - = gets me ā MINUS SIGN (custom)
⢠Compose - - w gets me ⸺ TWO EM DASH (custom; w for wide)
⢠Compose - - W gets me ⸻ THREE EM DASH (custom; W for Wider)
The last two I use occasionally, the other three I use very frequently. I went through a phase of using HYPHEN and SOFT HYPHEN, now I seldom use them.
I also like to write &c. (italic where supported) for et cetera.
For quotation marks, I also use custom mappings:
<Multi_key> <semicolon> <semicolon> : "ā" U2018 # LEFT SINGLE QUOTATION MARK
<Multi_key> <apostrophe> <apostrophe> : "ā" U2019 # RIGHT SINGLE QUOTATION MARK
<Multi_key> <colon> <colon> : "ā" U201c # LEFT DOUBLE QUOTATION MARK
<Multi_key> <quotedbl> <quotedbl> : "ā" U201d # RIGHT DOUBLE QUOTATION MARK
Think about how you physically type them, and I reckon these mappings make a lot of sense, very easy to type. Much better than the stock bindings (<' >' <" >") or kragen ones (`Space 'Space `` ''; or 6' 9' 6" 9").
āāā
(Oh yeah, that oneās <Multi_key> <h> <r> : "āāā".)
Now, I have one question Iād like answered. Overlapping sequences. If you have -> ā and <- ā youāre fine, but when you add <-> ā, I canāt find any way of using the <- sequence any more. Before fcitx5, some apps would ignore one or the other (in ways difficult to explain which I think involved the fact that some definitions came from includes), and some would let you terminate the sequence early and match the shorter one (e.g. Compose < - Enter). Is there some proper solution Iāve missed?
I have plans for an article on my keyboard arrangements, including sharing a full .XCompose, but Iām going to finish my next major revision to my website first. Because then Iāll be able to draw things instead of just writing.
āāā
On mobile, I think I use FUTO keyboard at present, which lets me access most of these things, but not elegantly. I want to make my own keyboard layout that lets me access the good stuff more easily, but I havenāt got to it yet.
Also: anyone want to join me in advocating for completion dictionaries and libraries to replace their ' apostrophes with ā, or at least to support both approaches equally? Iām fed up with not having this stuff, Vim is the only place where it was straightforward to get it about right, and mobile is just a mess.
frumiousirc
last Saturday at 1:03 PM
> If you have -> ā and <- ā youāre fine, but when you add <-> ā, I canāt find any way of using the <- sequence any more.
X11 is likely walking a tree of .XCompose entries with each keypress. Once it gets to '<' and '-' it finds 'ā' and does not continue to consider your next '>'. So, you need to provide a way to walk a different path.
This works for me.
<Multi_key> <less> <period> <greater> : "ā"
It is like how EN DASH is "--." to be distinct from EM DASH's "---".
In general we must consider the entirety of .XCompose when choosing new compose key bindings. Maybe there is some utility to help with that. For me, I removed 98% of the default Compose file entries which makes manual checking feasible.
chrismorgan
last Saturday at 2:12 PM
There is no X11 involved here, and even on systems running an X server instead of Wayland, judging by the symptoms Iāve seen, the X server isnāt actually involved in interpreting Compose sequencesāeach app implements the whole lot itself, and judging by the inconsistencies, not all are using the same library for it.
Some only let Compose < - (ā) work, stopping and preventing Compose < - > (ā) from working. Others, if I remember correctly, let Compose < - Enter work to get ā.
Once an Input Method is involved, it can handle the Compose key, and thatās what fcitx5 is doing for me now, so that everythingās behaving the same⦠but that āsameā is not what I reckon it should be.
lostlogin
last Saturday at 8:26 AM
Iām no longer concerned youāre an AI, but I am concerned.