News for hackers. Stuff that matters.
Re:WinCompose – A Compose Key for Windows by yc-kraln on Friday August 13, 2021 @12:03PM (#28170681)
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?

Re:WinCompose – A Compose Key for Windows by lithiumfrost on Friday August 13, 2021 @12:17PM (#28170876)
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.

Re:WinCompose – A Compose Key for Windows by shawnz on Friday August 13, 2021 @01:07PM (#28171602)
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-...

Re:WinCompose – A Compose Key for Windows by jtvjan on Friday August 13, 2021 @01:25PM (#28171823)
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.
Re:WinCompose – A Compose Key for Windows by shawnz on Friday August 13, 2021 @01:28PM (#28171843)
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

Re:WinCompose – A Compose Key for Windows by Symbiote on Friday August 13, 2021 @01:55PM (#28172151)
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 ).

Re:WinCompose – A Compose Key for Windows by shawnz on Friday August 13, 2021 @02:09PM (#28172303)
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.

Re:WinCompose – A Compose Key for Windows by sterlind on Friday August 13, 2021 @01:42PM (#28172028)
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.

Re:WinCompose – A Compose Key for Windows by bmn__ on Friday August 13, 2021 @07:26PM (#28176118)
> 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.

Re:WinCompose – A Compose Key for Windows by frosted-flakes on Friday August 13, 2021 @01:46PM (#28172069)
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.
Re:WinCompose – A Compose Key for Windows by shawnz on Friday August 13, 2021 @02:25PM (#28172444)
What makes this easier to learn? I think you could implement the same kinds of sequences by using AltGr combined with dead keys.
Re:WinCompose – A Compose Key for Windows by frosted-flakes on Friday August 13, 2021 @05:06PM (#28174521)
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?
Re:WinCompose – A Compose Key for Windows by shawnz on Friday August 13, 2021 @05:11PM (#28174574)
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.

Re:WinCompose – A Compose Key for Windows by account42 on Friday August 20, 2021 @08:35AM (#28245290)
> some entries output multiple characters

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

Re:WinCompose – A Compose Key for Windows by bradrn on Friday August 13, 2021 @09:37PM (#28176990)
I agree! This is exactly what I ended up doing: https://github.com/bradrn/Conkey
Re:WinCompose – A Compose Key for Windows by shawnz on Friday August 13, 2021 @10:00PM (#28177126)
Nice! Thank you for this.
Re:WinCompose – A Compose Key for Windows by MiddleEndian on Friday August 13, 2021 @01:37PM (#28171968)
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.

Re:WinCompose – A Compose Key for Windows by mkotowski on Friday August 13, 2021 @12:10PM (#28170761)
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).

Re:WinCompose – A Compose Key for Windows by mavhc on Friday August 13, 2021 @12:49PM (#28171362)
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:"...

Re:WinCompose – A Compose Key for Windows by jorams on Friday August 13, 2021 @01:22PM (#28171781)
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.

Re:WinCompose – A Compose Key for Windows by shawnz on Friday August 13, 2021 @01:31PM (#28171877)
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).
Re:WinCompose – A Compose Key for Windows by bradrn on Friday August 13, 2021 @09:42PM (#28177025)
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

Re:WinCompose – A Compose Key for Windows by mavhc on Wednesday August 18, 2021 @05:25PM (#28227389)
It is weird it's not altgr-' and altgr-^ that activate accents.
Re:WinCompose – A Compose Key for Windows by account42 on Friday August 20, 2021 @08:38AM (#28245313)
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.
Re:WinCompose – A Compose Key for Windows by Springtime on Friday August 13, 2021 @12:35PM (#28171155)
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.

Re:WinCompose – A Compose Key for Windows by frosted-flakes on Friday August 13, 2021 @01:55PM (#28172158)
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
Re:WinCompose – A Compose Key for Windows by kindall on Friday August 13, 2021 @03:54PM (#28173750)
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.

Re:WinCompose – A Compose Key for Windows by hollasch on Friday August 13, 2021 @01:38PM (#28171977)
That's my approach. Autohotkey plus sequences starting with "qq", like qqdeg (degree), qq>- (right arrow), and so forth.