Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Compose key — and by extension WinCompose — is used as a mnemonic shortcut for various characters, both predefined and custom.

For example, I am using WinCompose right now: … ’ č ß ɐ ə ” « ʌ × þ ð n’t ď ɥ. All the characters inserted without leaving hands off keyboard.

As far as I know, there is no built-in keyboard on Windows with that kind of functionality (the emoji keyboard under `Win+.` coming close, but with no customization and more centered on inputting singular characters rather than blending in with normal keyboard usage).



https://support.microsoft.com/en-us/topic/how-to-use-the-uni...

"Creating international characters

When you press the APOSTROPHE ( ' ) key, QUOTATION MARK ( " ) key, ACCENT GRAVE ( ` ) key, TILDE ( ~ ) key, or ACCENT CIRCUMFLEX,. also called the CARET key, ( ^ ) key, nothing is displayed on the screen until you press a second key:"...


The constant downside to that is that you can no longer type these characters without considering what the next character is going to be, and pressing space if you want to opt out of the combination. If you type the accented characters much more often than the quotes it can be fine, but it gets annoying very quickly while programming.

The compose key is basically an opt-in alternative to combining those characters that also allows a lot of other combinations.


If you are willing to create your own layout or use a third-party layout, you could forgo dead keys and instead put all your symbols on the "AltGr" layer (which I think basically works the same as the "Compose" key).


The approach I took for my keyboard layout [0] was a compromise: I kept the base layout the same as US, but added a bunch of dead keys on the AltGr layer. So e.g. ⟨ď⟩ is ‘G-% d’; ⟨ɐ⟩ is ‘G-f a’.

[0] https://github.com/bradrn/Conkey


It is weird it's not altgr-' and altgr-^ that activate accents.


That's what I use on Linux, in addition to direct Alt+Character for the variants I need most commonly and XCompose whatever is left.


Autohotkey is also useful for this. Any arbitrary set of characters can be auto replaced with the desired output, or alternatively be bound to a hotkey.

This removes the need to memorize some abstract set of Alt key sequences and instead one could type something such as ++degree to produce °. The sequence of characters could be anything to distinguish it from regularly used text, here using ++ and name of the symbol to illustrate.

WinCompose it appears uses a similar principle.


Fun fact, WinCompose used to be written in AutoHotkey. It's still shown as a branch on GitHub: https://github.com/samhocevar/wincompose/tree/autohotkey


I started writing my own WinCompose-like utility in AutoHotkey, before I learned about WinCompose. Gave up on that immediately, obviously.

AutoHotkey is really an amazing tool. The actual programming language is awkward, but it has capabilities no other tool offers without writing a bunch of tricky low-level C code yourself.


That's my approach. Autohotkey plus sequences starting with "qq", like qqdeg (degree), qq>- (right arrow), and so forth.




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

Search: