Hacker News new | ask | show | jobs
by 1oooqooq 677 days ago
i enter the five emojis i ever need to use by pressing <multikey>+u and then typing the emoji word. i think i can use skin color thumbs up just fine.

but yeah, no search. but also no extra windows. when i asked i assumed compose + something like an IME could solve both with the search/window being optional.

2 comments

Xcompose only offers sequences started with the "compose" key (whatever it is mapped to) and resulting in a single X key-symbol, so to type an emoji needing multiple uniciode codepoints that way, you'd have to enter multiple "compose sequences". Whatever you describe here is not simple Xcompose. AFAIK, GTK offers entering unicode codepoints in a similar way ...

Of course you can do a lot of things with "input methods" (like popping up some "picker" only when wanted). But then you'll depend on X clients being aware of them in some way, e.g. by implementing the XIM protocol. Lots of applications have that (even xterm), so it might be what you prefer and that's fine. My method with faked key press events is definitely hacky, but will work with any X client, that's the point of it ;)

> Xcompose only offers sequences started with the "compose" key (whatever it is mapped to)

Not correct. For example, on my usual keyboard layouts¹, I use sequences starting with <dead_A> and <dead_U> for superscripts and subscripts.

> and resulting in a single X key-symbol

Also not correct. I certainly have a few non-single-keysim entries in my .Xcompose, e.g. <Multi_key> <R> <2> ↦ ℝ².

¹ https://github.com/datatravelandexperiments/kps-keyboard-lay...

Indeed. In my experience you can use whatever mappings you want. Just grab a writing script that you never type in and go ham : `<Ethiopian_B> …` (Note: made up keysym).
Are there any major apps that don't support XIM? An IME is required for CJK languages, so there shouldn't be apps that meet (in common use && have CJK users && not supporting IME) criteria.

Implementation is beyond my ability, but if en-US locale were to finally adopt IME, I think it should be semi-trivial to include an optional dictionary file trained with emoji :tofu_on_fire: notation.

> and resulting in a single X key-symbol

¯\_(ツ)_/¯

(or, as it's spelled through my .XCompose, shift-altgr 3 3)

I think there was a time when compose sequences could only emit a single character, at least in some contexts. But as far as i can tell, every text box in every app on my machine supports multi-character sequences.

What is multikey?