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

Consistent cmd+x/c/v is great.

I've tried replicating this experience in Linux in many different ways over the years, but the best approach was to add `altwin(ctrl_alt_win)` to xkeyboard preferences together with custom `ctrl_space_toggle` for layout toggle. It achieves almost the same effect as Kinto without an additional daemon: physical Alt maps to Ctrl (Cmd in terms of Mac layout), Ctrl works as Super and Super/Win works as Alt — the closest, I think, to Apple keyboard layout. It event works fine in Wayland (sway).

Considering the terminal, remap your favorite terminal emulator to send control codes via Super+A..Z (physical Ctrl+A..Z), and unmap/remap to the required action Ctrl+A..Z (physical "Cmd"+A..Z). It works fine in Konsole and great in Alacritty. (unfortunately, I also have to add a second set of mappings for my native non-latin keyboard layout, because at toolkit-level keys are translated to latin layout, but remapping works only for a single layout).

Of course, it's only a half of the equation. Another part is Option/Compose. On Mac I used MathUnicode.keylayout. It was great, and it was a pleasure to tweak it for my needs. Xkeyboard with .XCompose (e.g. [1]) has two disadvantages: you can't use a key as both Multi key and e.g. Alt modifier simultaneously, and you don't see the composition preview. On Lenovo at least you can use `compose(prsc)` to make your left Win key an «Option-modifier» and its right PrtSc counterpart an «Option-compose». [1]: https://github.com/kragen/xcompose

Maybe one day I will buy another Mac... but shall we prefer comfort to freedom?



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

Search: