Live data from Hacker News

Kinto: Mac-style shortcut keys for Linux and Windows

github.com

71–80 of 248 posts

Re: Kinto: Mac-style shortcut keys for Linux and Windows

#71
post #57

Earlier quoted context omitted.

> One of the most common use cases for the `ctrl` key is COPYING shit and followed by PASTING shit and it DOES NOT WORK in a fucking TERMINAL... Because `ctrl-c` sends an interrupt Most terminals today have a copy-on-select feature, which means you don't need to ctrl-c at all. Just select and ctrl-v.

Usually in Linux (specifically in Xorg) it's select to copy and middle click to paste; which uses a separate buffer from the C-c/C-v clipboard. Personally I find this method much more usable than the traditional windows-style clipboard. Either way, you want to generally avoid C-c for copy in terminals because it's already bound to the all important "send sigterm signal to foreground process". This is on a long list o…

> generally avoid C-c for copy in terminals

Absolutely. But it's not cruft. It's the original meaning of the character, and the standard method of generation.

Ctrl+C is just like any other keypress which maps to a standard ASCII representation.

The error is in reusing ASCII chars for GUI actions. This was an obviously-bad idea in 1985, and it has never become a better idea.

Re: Kinto: Mac-style shortcut keys for Linux and Windows

#72

Everyone is talking about keyboard shortcut but just 2 months old mac user (due work) the biggest "fuck you" feature I encountered in Mac was key-repetition. In PC and Linux, if you push down any letter key and keep it pushed, it repeat the key with a certain speed. In mac you can't by default do this. You have to use the terminal and go to a system file, change a variable and reboot the mac. You can, in system prefe…

Look, every OS has to choose its defaults. They give you the option to change it through the defaults command: defaults write -g ApplePressAndHoldEnabled -bool false and you don't need to restart your computer. Every OS is going to do things their own way — but as long as you can easily change it, I don't see the point in complaining. Command taken from https://osxdaily.com/2011/08/04/enable-key-repeat-mac-os-x-l...…

>Look, every OS has to choose its defaults. They give you the option to change it through the defaults command

Yes totally, now let's use the same argument to change next mac release keyboard to Dvorak or Colemak layout. Look, you just need to go and change it in language setting! (to its credit both options, Dvorak & Colemak keyboard exist in Mac by default) The reason Mac doesn't do this, is ofc because strong majority of people are used to the QWERTY layout.

And I know how to change it, it was the first thing I did. and No you did need to restart apps/computer. (it even says that in your link!)

My point is that keyboard shortcut is a muscle memory thing, no point in lamenting over it too much if one shortcut exist in the next system, albeit another place, if it's same behavior (looking at you Alt-Tab). But how the input work is another matter; makes no sense to me to remove the steering wheel of a car and replace it with a flight stick, especially when there's already cross-platform apps that make certain strong assumptions about the users platform. (keyboard, mouse, certain keys such as copy-paste is reserved, etc)

Re: Kinto: Mac-style shortcut keys for Linux and Windows

#73
post #57

Earlier quoted context omitted.

> One of the most common use cases for the `ctrl` key is COPYING shit and followed by PASTING shit and it DOES NOT WORK in a fucking TERMINAL... Because `ctrl-c` sends an interrupt Most terminals today have a copy-on-select feature, which means you don't need to ctrl-c at all. Just select and ctrl-v.

Usually in Linux (specifically in Xorg) it's select to copy and middle click to paste; which uses a separate buffer from the C-c/C-v clipboard. Personally I find this method much more usable than the traditional windows-style clipboard. Either way, you want to generally avoid C-c for copy in terminals because it's already bound to the all important "send sigterm signal to foreground process". This is on a long list o…

The nice thing about how I wrote Kinto is that it supports numerous Terminal applications and the Cmd key location becomes Ctrl+Shift+(the_key_press), so you effectively have everything you'd want without needing contort your fingers for another modifier key.

I am serious about not wanting users of Kinto to feel like they are dying a death of a thousand paper cuts because they have to stop what they are doing and add yet another keymapping. Kinto can't get every app remapped right 100% of the time - but it gets awfully close still.

Initially I did not write Kinto that way because I didn't think it to be all that possible and with setxkbmap it was very difficult to understand and properly implement such a configuration. Probonopd, who does write some wonderful articles about UX related topics that I've also seen hit the frontpage here mentioned not wanting to remap terminals at all - I agreed and eventually delivered. He also made sure that I worked out wordwise hotkeys as well.

Also with it being rewritten, several months ago, to use xkeysnail it is also very simple to add additional hotkey remappings to as well.

Re: Kinto: Mac-style shortcut keys for Linux and Windows

#74

This is great, btw. Kinto is 100% a sanity saver. Please note the following rant is mostly tongue-in-cheek. 'cuz it turns out, I personally hate how Windows and Linux do things with `ctrl`. Coming from a Mac, my biggest and most consistent annoyance is that the `ctrl` key is fucking useless at best... One of the most common use cases for the `ctrl` key is COPYING shit and followed by PASTING shit and it DOES NOT WORK…

I kind of disagree (I mean, ctrl+insert/shift+insert works consistently, right?)

The one time I get really frustrated with conflicting keyboard shortcuts is when trying to do terminal work in a web browser, through, like the odd KVM session when SSH is down. The number of times I instinctively pressed Ctrl+W to correct a word in bash and instead close the whole session... Or, depending on emulator, inability to paste. Even more frustrating that these situations are commonly high-pressure.

Re: Kinto: Mac-style shortcut keys for Linux and Windows

#75
post #12

The difference between Mac and PC keyboards is a real usability problem. If you're used to PC's or Linux, moving to a Mac and dealing with their shortcuts is painful, and vice-versa. The worst is using a mixture of both Mac's and PC's on a daily basis. Moving back and forth between platforms daily means you either have to get used to hitting the wrong shortcuts or use a hack to swap keys around on one platform so you…

I’m using the two platforms but I would like the reverse: Windows shortcuts on Mac. I like the fact ctrl is further away from c and v, making it easier to type. Also Mac shortcuts in general are pretty wild (not to say insane) with 3 or 4 key to type at once... when shortcuts would gain to be shortcuted, the UX isn’t too good.

Re: Kinto: Mac-style shortcut keys for Linux and Windows

#76
post #65

This is great, btw. Kinto is 100% a sanity saver. Please note the following rant is mostly tongue-in-cheek. 'cuz it turns out, I personally hate how Windows and Linux do things with `ctrl`. Coming from a Mac, my biggest and most consistent annoyance is that the `ctrl` key is fucking useless at best... One of the most common use cases for the `ctrl` key is COPYING shit and followed by PASTING shit and it DOES NOT WORK…

I'm having difficulty parsing your rant. I can't tell if we agree or not. :) Ctrl+C is a method of generating a standard ASCII character which has meant "ETX" (end of text, sometimes "interrupt") for many decades. Other control chars are useful too. In addition to C, I use S, Q, D, Z, V, O, N, I, G, H, M, L, J, Y, A, E, K, W ... probably others ... fairly regularly. So in the early 1980s, along comes MacOS which need…

> They add a key to the keyboard, an Alt or Meta equivalent called "Command". OK, awesome.

Apple added three keys on the original Mac keyboard. The Command key, the Option key (which is used, more or less, as a second Shift key) and the Enter key (not to be confused with Return). The Enter key eventually was deprecated and made equivalent to keypad-Enter. It's now mapped to Shift-Return on Macs. The Option key, not the Command key, is now mapped on modern keyboards to Alt. The Command key is its own wonderful beast. Both ESC and Control were missing; both were added back later.

Re: Kinto: Mac-style shortcut keys for Linux and Windows

#77
post #65

Earlier quoted context omitted.

I'm having difficulty parsing your rant. I can't tell if we agree or not. :) Ctrl+C is a method of generating a standard ASCII character which has meant "ETX" (end of text, sometimes "interrupt") for many decades. Other control chars are useful too. In addition to C, I use S, Q, D, Z, V, O, N, I, G, H, M, L, J, Y, A, E, K, W ... probably others ... fairly regularly. So in the early 1980s, along comes MacOS which need…

> They add a key to the keyboard, an Alt or Meta equivalent called "Command". OK, awesome. Apple added three keys on the original Mac keyboard. The Command key, the Option key (which is used, more or less, as a second Shift key) and the Enter key (not to be confused with Return). The Enter key eventually was deprecated and made equivalent to keypad-Enter. It's now mapped to Shift-Return on Macs. The Option key, not t…

This is true, and it's an evolution from the Apple II (//, ][, etc) days which had two Apple keys (Open Apple and Closed Apple), one on each side of the space bar.

I recall reading somewhere that Jobs hated Open Apple and Closed Apple. But thank goodness for ⌘ !

Re: Kinto: Mac-style shortcut keys for Linux and Windows

#78

What I really want, though, is Mac-style character-entry in Linux. It's so much easier to type accented characters in Mac.

Have you tried altgr-intl layout? us-altgr-intl is a variety that exposes accented characters through AltGr-combinations. I have to type in Scandinavian, Germanic, French and Latin languages and they're all covered. As a bonus it's consistent between platforms, included by default on all distros I know of, and except the Altgr-combinations it's just like the vanilla layout.

If you're on X11 you can try out the en-us variant by

  setxkbmap -layout "us" -variant altgr-intl

Re: Kinto: Mac-style shortcut keys for Linux and Windows

#79
post #7
post #3

Earlier quoted context omitted.

I don’t get the fascination with macOS keyboard shortcuts, people always mention the copy thing that you did and it doesn’t seem like that big of a deal.

There's two parts to it. One, that macOS has a proscribed way for apps to compose command, ctrl, and option for shortcuts, whereas it's basically the Wild West on the other platforms. So it's just generally nice on macOS. The terminal thing is, in the grand scheme of things, minor, but a very nice QoL. It's annoying to mode shift from ctrl as a desktop environment modifier to ctrl as a unix modifier. Especially when…

> One, that macOS has a proscribed way for apps

Presumably, “prescribed”; “proscribed” is essentially the opposite.

Post reply on HN