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

I don't understand how this is different than the "International" keyboard variants that ship with Windows.

How is this better than the status quo?



For one, the character coverage is much broader than what's typically found on an international keyboard.

I use it all the time for typing arrows and other symbols, for example. YMMV but I also find it mnemonically better, from time to time I can just guess what the right Compose sequence is.


Wouldn't it be better to just create a new keyboard layout featuring the composed keys you want, rather than running software constantly in the background to achieve the same thing?

See here for example: https://dailydoseoftech.com/how-to-create-a-custom-keyboard-...


Not really. I don't know in advance which symbols I want to type, and even then I'd have to learn where I put the symbols on the custom layout, while the compose sequences I can usually guess. Considering the amount of background processes the typical Windows system runs, having one additional program really doesn't make a difference.


I don't necessarily mean that each individual user of the software should do this. I mean, why not just create a new layout instead of developing this? Or as a user, why not just use a layout someone else has already developed which has logical choices for the composed keys?

EDIT: Some compelling arguments in favour of the app in this thread. Thank you


You'd swiftly run out of practical combinations.

On the 1 key, I have 1 and !. Maybe I could add ¹ and ₁, with AltGr and Shift+AltGr (or Ctrl, or something). Maybe ½ and ¼?

With Compose, I have ¹, ₁, ½, ⅓, ¼, ⅕, ⅙, ⅐, ⅛, ⅑, ⅒, ①, ⑩, ⑪, … ㊶ which involve the 1 key. I do not need to look up the sequences for these, as they're intuitive: Compose ^ 1, Compose _ 1, Compose 1 2, … Compose ( 4 1 ).


You could maybe use AltGr combined with dead keys to accomplish that, but I suppose it would be limited to combinations of two keys (plus the modifier).

EDIT: Actually, it seems Windows supports chained dead keys, so I think you could accomplish longer sequences with a plain old Windows keyboard layout definition too. But that's not supported with MSKLC.


you can't compose keyboard layouts, so you'd either have to stick with only QWERTY or generate separate enhanced layouts for Azerty + Dvorak + etc. discoverability would also be harder, and you'd have to hold down every key in the combo instead of pressing them in sequence holding the compose key, so you couldn't distinguish /ae/ vs /ea/ and you'd get carpal tunnel.

side-note: X11 layouts are really frustrating. there's a hard constraint of one key combo -> one Unicode character, which makes it impossible to output multiple characters. I run into this with Lushootseed, which has /ƛ̕/ (glottalized barred lambda encoded as barred lambda + accent marker), but you'd never write it without the accent in that language.


> there's a hard constraint of one key combo -> one Unicode character, which makes it impossible to output multiple characters.

The orthodox solution for this problem is an IME.

Quickest path to success is via editing a new map file /usr/share/m17n/lut.mim (see Blackfoot and Inuktitut in the same directory for examples of multiple character output) and then using the m17n plugin for fcitx or scim or ibus.


Because a Compose key allows you to type any of thousands of characters, which (a) isn't possible with a custom keyboard layout, and even if it was, (b) would be very difficult to learn.


What makes this easier to learn? I think you could implement the same kinds of sequences by using AltGr combined with dead keys.


So you're going to turn every key on the keyboard into a dead key? Also, the compose file can easily be customized, and some entries output multiple characters or involve non-character keys like the arrows. How is that going to work with a static keyboard layout?


Only AltGr + [the key] would be a dead key, not the bare key itself. Perhaps a tool could be made to convert compose files into Windows keyboard layout definitions with this strategy

That's a good point about non-character keys though, I don't think that could be supported with this method.


> some entries output multiple characters

Too bad that Qt broke support for that in version 5 and has never fixed it.


I agree! This is exactly what I ended up doing: https://github.com/bradrn/Conkey


Nice! Thank you for this.


Say I want to type the copyright symbol, not something I do every day, not something worth its own key on my keyboard. I type Compose O C and it gives me: ©, Compose ~ ~ gives me ≈,

The built-in shortcuts are very easy to guess, it's great for things I don't type every day. Plus you can add or remove shortcuts so you can change your layout on the fly.

It's great in Windows, Compose is great in Linux, and it's also is a good alternative for the otherwise useless CapsLock key.


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: