Kinto: Mac-style shortcut keys for Linux and Windows
github.com
github.com
'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 in a fucking TERMINAL... Because `ctrl-c` sends an interrupt, I don't know what `ctrl-v` sends and I don't give a shit as long as it is not pasting my fucking buffer.
Seriously... on Linux this has got to be the worst default ever made. Sure `ctrl+shift-c` will copy things but it's fighting decades of fucking muscle memory... and if I miss the shift, "boom" repl killed. Great experience for someone totally new to the OS, just follow this tutorial, start by copying this from your spooky new black box: "[^C program exited." I'm willing to bet I ran into that exact thing years ago in highschool and just attributed it to me being a dumbass and gave up: "damn, I can't even copy paste shit in this, I'll never figure it out" instead of that being the worst most absurd default on a *nix system ever.
And the "Windows/Hyper" key? Ah yes, here's a key that was created to globally disrupt whatever you are doing. So where is the obvious location? In-between two keys that are ONLY used as modifiers; so, when you accidentally hit the wrong one you always lose focus. Even better is when you accidentally do so on both characters; enabling some obscure setting or window you can't correctly undo because you don't know what you pressed!
I'm glad to know there are at least some other sane people out there who have realized 1992 may not have been the pinnacle of desktop computing...
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.
The Windows GUI copied the Mac’s keyboard shortcuts (originally from Lisa?) but didn't have a dedicated key for them so re-used the existing Ctrl key, which already had a meaning on text-based operating systems. (This happened because Microsoft had no input into hardware keyboard layouts, and wanted to make software compatible with the plethora of IBM-Model-M-layout keyboards available in 1985–1990.)
Then Linux GUIs wholesale copied every feature of Windows they could including the keyboard shortcuts, in a context where this was even worse, because now existing Ctrl-based shortcuts from terminal software were directly in conflict with new Ctrl-based shortcuts from Windows.
Except for that particular action (select some text on terminal then copy) you have to use mouse to do the "select" part anyways.
Where a mouse is really needed is in action games. A touchpad is too slow there.
In this context there is a lot of difference between a mouse and a touchpad. For example, I select text with the keyboard most of the times in emacs and in any other input box (not in vim, is it even possible?). So I'd lose time by reaching to a mouse. I hardly have to move my hands to use my touchpad.
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 of ancient cruft that exists in terminal emulators and shells.
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.
My perspective is that control characters were a bad idea from the beginning. Then again, so are ubiquitous predefined keyboard shortcuts like C-c.
Having user interaction predefined makes it more difficult to change keyboard layouts and shapes.
So if you have in-band signalling, you need a method to generate those signals. I don't think there was any other viable way to solve this problem, and honestly it has worked almost flawlessly.
Of course Microsoft is a big exception, but that could hardly have been predicted 20 years earlier.
My point here is that we are so steeped into tradition that usability suffers.
In-band signalling is inherently a bit of an architectural challenge. But the problem is solved. The entire internet is run on in-band signalling! We're going on 35 years for TCP/IP, and more like 50 for ASCII control chars. They work very, very well.
Yes, Microsoft broke control character generation for users of their OS, but that's a compartmentalized failure, and easily avoided. The Ctrl+Shift GUI workaround in Windows (and copied in Linux) is not elegant. But any alternative without control chars would be a total loss of functionality.
Ctrl+C being broken by Copy is a trivial example. There's a whole alphabet of control chars (in fact there are 32), and we all use more of them than most people realize[0]. Some have dedicated keys on the keyboard (backspace, return), but obviously not all of them.
I use about a dozen control characters regularly. This is not unusual for someone who works closely with server operating systems.
[0] I'm not sure how to gauge your knowledge of communication signalling or protocols, so I apologize if I'm being pedantic. It sounds like you have ideas about alternatives (and this is interesting to me), so I am curious about any specifics you can share or link to.
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.
stty intr ^X
Then ctrl-c will no longer bother you, and your muscle memory will quickly adapt as X is very close to C
By the way, I don't even know if I could paste with control c or control shift c back then. Maybe there was only middle click.
I could try again now and see what happens.
The thing is it's the default on iTerm2 on the Mac, so every time I set it up I spend a week thinking "why is my clipboard always completely full of shite" before I remember and turn it off.
(YMMV, you may like this, you may actually have proper clipboard management, and so on. I didn't say this was a logically consistent rant.)
It's possible that this isn't enabled by default, but I'm virtually certain it is because it catches me out every time.
X11 by contrast has by default 2 buffers so you never clobber your buffer filled by control+c however some clipboard management software optionally syncs the 2 buffers bringing back the behavior you dislike.
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 needs keyboard shortcuts for GUI actions. What does Apple do? They add a key to the keyboard, an Alt or Meta equivalent called "Command". OK, awesome.
Then Windows comes along. Microsoft says "eh, who cares let's break it all", (or more charitably "we don't control the hardware and can't add a key, so let's break it all") and reuses Ctrl+C for copy. Et cetera.
Then Linux desktop environments come along and say "well people really like Windows...we don't, but most people who might try our DE probably do, so let's borrow the bad ideas from Windows instead of the good ideas from Unix or MacOS. Let's use Ctrl+C for copy! But also the command line is kind of important on Linux, so let's screw everything up and use Ctrl+Shift+C for copy in the terminal only because who cares about usability and UX consistency? Not us!"
That was 25 years ago. Nothing has improved since then. Alas.
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.
I recall reading somewhere that Jobs hated Open Apple and Closed Apple. But thank goodness for ⌘ !
Wikipedia has both the //e and the Lisa with a release date of January 1983. But of course the Lisa project goes way back!
I should have been more clear, indeed, I find sending signals to the system using the `ctrl` good and proper. I have no problem with the control key, sequences, or characters. My issue is ignoring the sheer, maddening, brilliance of the command key...
> Then Linux desktop environments come along and say "well people really like Windows...we don't, but most people who might try our DE probably do, so let's borrow the bad ideas from Windows instead of the good ideas from Unix or MacOS. Let's use Ctrl+C for copy! But also the command line is kind of important on Linux, so let's screw everything up and use Ctrl+Shift+C for copy in the terminal only because who cares about usability and UX consistency? Not us!"
Yes :jacknicholsonnoddingandsmiling:
Linux and non-mac *nix systems emphasize how powerful the command line is but totally fucking ignore even the most fundamental of modern use case(s): copying and fucking pasting. It's just fucking silly. Yew (being a fancy terminal box thing) ain't that powerful if yew cain't (yeah, that's can't + ain't) copy and paste some shit. It's like someone bragging about how fast they can type with their feet, "...cool brometheus... how about you get a fucking job and pay rent for once?"
shakes fist menacingly at the ether
But they do control it enough to add the Windows logo key and the context menu key.
I use the Windows logo "Super" key a lot (mostly for workspaces) and I miss the context menu key which is there on my office keyboard but lacks on my laptop (which even has a keypad). Being able to open a context menu without using a mouse is a very useful convenience.
But I agree it was a good thing to have.
It wasn't Microsoft though. Common GUI hotkeys like Ctrl+Z/X/C/V/P were introduced in Xerox Alto first, and everybody else used this as a convention, including Microsoft.
I'm not sure what hotkeys Alto Executive used, and whether there was a mnemonic conflict at all.
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.
Same with the Windows home/end for sending the cursor to the beginning/end of line. That entire block of keys is only useful for navigating documents, they’re just unergonomic to use when you’re also typing.
For home/end:
Ctrl+A/Ctrl+E for all shells, ^/$ otherwise
You will need SharpKeys[2] and Autohotkey[3] at least in my set up.
[1]: https://images-na.ssl-images-amazon.com/images/I/61oeDlRN4QL...
I bought one, threw it into garbage the second day.
Just checked and you can even order from Amazon JP and let ship to Europe. Nice, problem seems to be solved. Did you ever order something from them?
Do you know what scan codes (or in general what characters) those Japanese keys next to the spacebar send when the keyboard layout is set to US?
All you do is press the key in the "Type Key" blank in SharpKeys.
I have actually gotten a Japanese Thinkpad keyboard for my laptop although its for the T420 model. I would have to check my Desktop to see how this works again(on a laptop right now) if you want the actual scan codes. I will say I haven't gotten this to work on Linux just Mac and Windows unfortunately.
(1) Where did you get the (internal) JP keyboard for your Thinkpad, Ebay or Lenovo parts sales?
(2) Imagine those 5 keys on your JP keyboard...
_ _ _____ _ _
|1||2||Space||4||5|
...how convenient is it for your left thumb to hit 1 and 2 and for your right thumb to hit 3 (Space), 4 and 5, each on a scale from 0 to 10? Bonus question: do you have small, medium or big hands?And how did you get the idea to use a JP keyboard?
ps I use AHK, have to check out Sharpkeys!
2) I have 2 of the 3 Japanese keys mapped to control/modifier and and the third mapped to space. Your picture seems to be off there aren't four modifier keys but three. The switch is quit seamless between a Mac and Windows. Medium Hands. I was analyzing keyboard layouts.
How was your experience, would you use them again? And I assume you did a full managed buy?!
If this thread is getting restricted you can also PM me on reddit with the same username.
(And Linux the OS doesn't have any opinion on GUI terminal keybindings. You may be tempted to point your finger of blame towards X11 next, but X11 traditionally the text selection is mouse based with implicit copy on select - paste defaults to shift-insert in the bundled X11 terminal emulator. The shift-ctrl-c charade was created by gnome-terminal I think)
Ctrl + Shift + Ins (paste) and Ctrl + Shift + Supr (copy)
Ctrl + Shift + v (paste) and Ctrl + Shift + c (copy)
so alt+c for copy, alt+v for paste etc. it solves the terminal problem AND it reduces strain on the thumb.
Obviously either of these would rarely happen, but every time I use a terminal in macOS I end up accidentally killing a process because I can't keep the modifier keys straight, so I'm sensitive to introducing the issue on Linux. (On Linux, I have the opposite problem, which is that I try to Ctrl-shift-c in Firefox, which opens the dev tools.)
I don’t see how that can happen. If you tap c twice, you either copy twice (copying keeps text selected), which is harmless, or, if you release the control key between the taps, type a c, which doesn’t kill the process.
The accidental deselect, on the other hand, can indeed be problematic.
And then just middle click to paste again.
Also eOS implementation has its issues, smart copy needs to be disabled too for Kinto to work - thankfully it’s practically the only one.
Probably this will not work for many people but is great for me since I have tons of keyboards shortcuts in my IDE and DE that use ctrl and shift . I think I use Alt only for Alt+tab but I don't need it that often because I have 7 virtual desktops that I reach using Ctrl+f1/f7
Different people will have a preference for one layout vs the other but, in reality, the layout that feels good is what you're used to.
The PC and Linux worlds are not going to adopt Mac keyboard layouts. As the one oddball computer manufacturer that uses their own layout, perhaps it's time for Apple to offer PC keyboard layouts as an option on their machines out of consideration for people who have to use multiple platforms.
Or maybe Mac users have had that keyboard layout for decades and are happy with it? Anyone who really wants a Windows-style layout could just change their own anyway, so people must not be that bothered.
Surely you’re aware that these keyboard shortcuts have been in use on Macs for about a decade before Linux existed, right?
(In the Mac case at least using cmd+c is superior, and even works in Emacs!)
(And macOS's built-in emacs keybindings available in every textbox uses ctrl+opt for meta.)
They don’t want to be interoperable because then you might realize you’re paying a huge premium for an inferior product.
It was Microsoft who chose to be different here.
Current PC keyboards, minus the Windows key, are nearly identical to The IBM model F that came with the IBM 3270 in 1983 [1] (the arrow keys are quite different). (Note: IBM is responsible for this, not Microsoft)
The Apple IIe also came out in 1983 [2] but had a very different layout from what Apple uses today. The "open apple" and "closed apple" (two different modifiers) were all that was on the bottom row, similar to left and right command. Control was located above, and option was missing.
Macintosh's keyboards kept evolving well after PC keyboards reached their final form, aside from the addition of the windows key in 1994 (that was microsoft, not surprisingly).
[1]https://en.wikipedia.org/wiki/Model_F_keyboard#/media/File:I...
[2]https://upload.wikimedia.org/wikipedia/commons/9/9f/Apple_II...
Edit: Just for giggles, here's the 1982 Commodore 64's keyboard:
https://upload.wikimedia.org/wikipedia/commons/e/e9/Commodor...
And the 1984 Commodore Amiga 1000's keyboard:
https://www.oldcomputr.com/wp-content/uploads/2014/07/commod...
Every platform has had it's own ideas about what keyboards should look like. In terms of current user-base, the clear winner is the IBM PC keyboard. It was more justifiable for manufacturers to go their own way in the wild and wooley early 80's while everyone was inventing their own way of doing things. Today, when the same software runs on multiple platforms, it's an annoying problem.
One more fun edit:
Here's the 1977 Apple II keyboard.
https://upload.wikimedia.org/wikipedia/commons/9/98/Apple_II...
Just imagine using a computer with the power key right next to the Shift key and where the CTRL key is today!
Very quickly, the Mac keyboard shortcuts have totally won me over with how much better they are. They’re actually a big part of the reason I got into the computer in the first place. It’s SO much nicer once you get used to it.
Doubly so because I use an ergonomic split keyboard, so the Mac layout means it’s much easier to do most actions without twisting my hands in weird ways. Copy in terminal? Cmd+C. Compared to Ctrl+Shift+C.
Ctrl still works for all of the standard terminal functions.
And, as a big vim user, I can use a vim emulator within my IDE. I can still get all of the IDE shortcuts with The Cmd key, but also all of the vim actions with the Ctrl key still work and don’t conflict. This is arguably the biggest win of all.
As someone who've been on linux for almost a decade on different notebooks and then switched to mac - no, not an inferior product in any way.
5 seconds 5 times a day is 12 hours
By 50 times a day you are spending 5 whole days.
Seems objectively worthwhile.
Plus, after much searching, there is not a good non-Apple keyboard for the Mac and the Apple keyboards aren't good for Windows. One example: the right side of of the left ⌘ key should be vertically flush with the right side of the X key. This makes it much more natural to reach for all those ⌘ shortcuts (particularly ⌘ + r and ⌘ + t, and for me I have many ⌥ hotkeys setup with BTT). On most Windows keyboards, Alt is left of Spacebar, and Alt's right side lands vertically on the middle of the X key, not on the right side.
I have been very happy with my successive Matias keyboards over the years.
And that’s a damn shame, because they make much more sense.
> As the one oddball computer manufacturer that uses their own layout, perhaps it's time for Apple to offer PC keyboard layouts as an option on their machines out of consideration for people who have to use multiple platforms.
Lol no. I use Linux, Windows and macOS each about a third of the time (Linux for work, Windows because I have to, and macOS for fun and working from home), the last thing I would want is my Mac at home getting significantly worse just to reach the lowest common denominator. Besides, you can use any PC keyboard already if you really like the window key.
The use of control as the modifier key for keyboard shortcuts is an unfortunate historical accident, not the better way.
Yeah, then what would mac have going for it ?
They actually do/did, in a combination of custom shortcuts in system settings, plus an obscure and ancient .plist to change input navigation shortcuts. But Electron ruined everything, because instead of understanding the underlying platform's input methods, apps like Slack hard-code mac-ish keyboard shortcuts and behavior of home/end keys.
I switch between Mac, Linux, and Windows. The Mac is the only one with a usable, consistent terminal. Linux and Windows both have really fucked up copy/paste. Shift+Insert, Control+Shift+V, right-click, middle-click… what a goddamn mess. For some reason, Windows, which was supposed to have “right-click brings up a contextual menu everywhere” decides to make right-click do some weird almost X11-like copy-pasting in the terminal. Linux at least has the half-sane Control+Shift+C and Control+Shift+V but there’s multiple clipboards, and different applications may only use a subset of those.
Mac? ⌘C copy. ⌘V paste. Everywhere. Terminal, no terminal, same everywhere. Hands stay in center of keyboard where they belong. No reaching for the “insert” key, which is a recipe for typos.
Let’s not make the Mac worse just to make things consistent.
I used windows machines an overwhelming majority of my life but I find the Mac OS shortcuts to just be much easier to remember and reach with one hand. For example cmd Q for quit as opposed to alt f4 just makes sense.
I've recently discovered VSCode's remote functionality (more specifically, how incredibly well it works), so I've set up an SSH box and can now seamlessly work from anywhere (side note, having tools that only serve you is incredibly fast if you're used to things like GitHub or managed CI).
While it's true that a familiar system will initially feel better than an unknown alternative, this doesn't mean that some systems can't be better than others.
From my personal experience and from the comments in this thread, I think it's safe to conclude that the Mac is better here.
Over the years, I've been through so many platforms and apps, back and forth, so many times, all with their own conflicting shortcuts and different input modes day-to-day, that I've just accepted it as part of my "mindfulness practice" to always be aware of where and how I am before I press or click anything.
Reminds me of Altered Carbon, just a much more geeky version.
With Windows and Mac both, it wasn't any one thing in particular, just a "death by a thousand cuts", so to speak, of a general feeling of the platform changing shape without me having any say in it, without any bi-directional feedback, just changing at someone else's whim, and having little power over it.
Not only was it changing, but it was continuously disempowering me, with more and more things becoming controlled by the OS system, also without me having any say in it.
In the beginning, with Windows there was the seemingly additional friction of the whole drive letters and backslashes thing, and my doing most of my development in GNU-land... But then I realized that Mac GNU is almost as far away from what I develop on anyway, and I found it more comfortable to use a GNU/Linux VM to write code on anyway. I only used Mac for stuff like media playback and low-risk web browsing.
After that, it was only a matter of time.
Stallman was right, and I'm so grateful to have this wonderful platform which works reasonably the way I want it to, doesn't upgrade without my consent, and is infinitely configurable and meldable to my liking. Sure, there's a whole slew of crap being grafted onto it like systemd, Wayland, Chromium, etc... But it's all optional, and I don't have to use it. Thank you, GNU, thank you rms, thank you all the devs! I'm forever grateful to you for all your hard work.
But... you don't have to use any of this
(in fact, I can't even use Wayland at all, even if I wanted to [because of Nvidia])
There’s no such thing as "Mac GNU", since the userland and outermost kernel interface is of BSD lignage.
Which does a double whammy on the "GNU/Linux" pedantry, since the Linux-based system described above has only a very limited part of it that are actual GNU projects, or even GPL licensed.
That is, unless I’m mistaken and parent uses a system without Xorg, and only lives with bash, glibc, make, GCC, coreutils, and emacs. GNU/Linux is quite an ascetic system these days.
first thing I install on my macs are the gnu coreutils. bsd are so useless in comparison
The state of the Windows UI now is a disgrace. Its design defects and lack of organization confound users of every expertise level, and its defects make every task a day-ruining ordeal.
Microsoft even took away one UI facility that always made it superior to the Mac: user-definable color schemes. WTF? I was using my own "dark mode", a charcoal color scheme, since the early '90s. Now I challenge you to find the color-scheme editor in Windows. Just as everyone finally realized that inverse color schemes are stupid, Microsoft started forcing one on you.
And it doesn't look like Microsoft has any inclination to overhaul its failed mess. But really, what motivation do they have? Who uses Windows now who doesn't have to do so for work, using some specific software?
Even Visual Studio, which I held out as the gold standard for IDEs, suffers from the same dumb defects it did 25 years ago. They were tolerable then, but now everyone else has caught up and surpassed it. Even Xcode.
You can use semicolons, commas, or newlines: https://tsplay.dev/wXR7om
For reference, I really like how shortcuts work in MacOS. This won't solve the lack of a standard that developers try to adhere to on other platforms.
But it's immensely annoying to have to shift between ctrl+c and ctrl+shift+c depending on whether or not you're on a terminal versus another application. As a bonus, I press command with my thumb which is both stronger than my pinkie and has very little to do other than press space normally.
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 ctrl+c can be quite a bit more destructive than "copy".
It's not like it's impossible to adjust, but it's very nice to have command+c do the same thing, everywhere.
Yeah, I would sum it up as reducing the number of discrete shortcut sets to remember to the bare minimum, instead lumping as much as possible into the global set.
Presumably, “prescribed”; “proscribed” is essentially the opposite.
This is the difference between a command based shortcuts and ctrl based shortcuts (unless you are using a non-standard ctrl key).
There is a reason why people get "emacs pinky" but no-one gets "mac thumb".
- Super key isn't wasted on window management (a thing you basically are doing a handful of time per sessions). A nicely-placed key is used for things that you do a lot!
- No "oh wow the start menu showed up randomly" BS when you fat finger.
- Control commands "just work" everywhere! Terminal usage is of course easy, but ctrl-a/ctrl-e also work for cursor movement. You get great text maninpulation! Seriously, being able to move the cursor around in any text field is a game changer.
- Isolation of most system-level operations to that key mean that you are unlikely to hit weird conflicts. And if you fat-finger you can Super-Z out of your issue most of the time.
As a developer I want terminals, code editors and any other commonly used dev related applications to have the same keymaps as macOS out of the box.
As a user I want to seamlessly use and/or easily switch between official Apple keyboards, 3rd party Apple keyboards, Windows keyboards, chromebook keyboards, or IBM style keyboard (w/o a Win key).
I really need to get Kinto packaged officially into the repos for various distributions.
> I prioritized the info to make it a little faster to get up and running versus the need to scroll past an ever increasingly long ToC. For the most part people shouldn't really need to read something a mile long to get it up and running.
This is fair! But I don't want to "get set up and running" on something I've never heard of and don't know what it's going to do. I still don't understand why it says "copy and paste with all apps and terminals"... is it because you can copy and paste with a keyboard shortcut?
To be honest the genesis of Kinto came from my Dell XPS 13 Developer Edition days in 2016 - I was wanting to make Ubuntu my primary OS, but I was highly annoyed by 2 things.
1) Copying and pasting btwn the general GUI apps and the terminal had inconsistent hotkeys because of the need to hold down shift on the terminals. That has always stuck w/ me and I have never liked the need to carry or backup dotfiles around for hotkey configurations of individual apps or being forced into creating a global, always on, hotkey (aka xmodmap, setxkbmap, etc). Autokey was also not good enough & my early python based attempts at context switching was far from what it needed to be.
2) The Dell XPS 13 had a hardware level bug that would cause the kernel on either Linux or macOS to halt the system randomly. I reported it to the community & as far as I know that bug still exists to this day. Only Windows would ignore it, so I sold it and bought another macbook pro after that.
You have to understand that I decided to commit 100% to the macOS keyboard layout in 2012 - up until then I had been switching back and forth btwn Windows, macOS and Linux distros, but I wanted to get a lot more serious about programming and it felt like too much additional mental overhead to keep changing that gear, especially as I was learning new keymaps in code editors that were not consistent btwn OS's. I also committed for ergonomic reasons and the how the terminal behaved.
Back then Apple was still making fairly good decisions and updates to their OS unlike how I feel about that platform in the last few years.
Kinto is just a culmination of an itch I've had for a very long time - it's just I've been extra motivated to scratch it in the last 2-3 years and it's really come together pretty well in the last several months. It's literally the program I wish had always existed for Linux and the one I wouldn't have had to write in the first place lol.
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?
It's nice to use an "official" product to remap the ctrl / cmd keys on my Apple keyboard while using my Windows PC.
https://docs.microsoft.com/en-us/windows/powertoys/keyboard-...
I don't think Kinto will be switching over to leveraging PowerToys though because AutoHotKey has been able to accomplish everything it needs to do so far and frankly much more complicated remaps than what Powertoys can currently do. I did have some doubts about whether AutoHotKey would be better in all cases - as I initially ran into issues with RDP sessions, but have since worked those problems out for the most part. The problems that remain appear to be isolated to chromebooks RDPing into Windows & probably wouldn't impact 99% of the people that would use Kinto over RDP still. It's a very specific combo & most of the time it executes normally and I am the author and I dog food this project daily.
Additionally the remaps are non-permanent so there's no need to log off or back on like you would if were to use sharpkeys to do the remapping. Also it is by design - if you want to pair program with a co-worker and they don't share you're affinity for mac style hotkeys then toggling Kinto off is a couple of simple clicks of the mouse.
I think it's a possible thing to do however from what I have seen for anyone that wants to put in the effort.
If you're on X11 you can try out the en-us variant by
setxkbmap -layout "us" -variant altgr-intlFor cases when you just want an accent occasionally compose key is great.
The Mac way (long-press, select) looks cool but it hardly is convenient to press and wait seconds for every accent if it's there in almost every word.
Surly this could be better?
It works shockingly well.
Only annoyance is that applications are not necessarily aware of the new mac layout so if you're using an unfamiliar application looking up the keyboard shortcuts won't map exactly to what you need to press.
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 preferences change "speed" and "delay" of this behavior but by default this only applies to the space/backspace/arrow key. As a vim user this was probably the most annoying thing I encountered in years.
Something so fundamental being different was like being told "yea, at mac land gravity is going upward. Better get used to it!". I sent a request to change my laptop to dual boot PC/Linux the next day
Although when I first transitioned to Macs I was not a heavy terminal user like I am now - always been into dev work, mostly web development back then. And I do recall changing that setting via the terminal, but I was never annoyed by it though as I tended to do far less customization to the OS than Windows or Linux.
And this is awesome to be replying to Saurik! Thank you so much for the work you've done in the iOS jailbreaking community.
For a while I couldn't put my finger at why this was, and then I realized that scrolling up/down is essentially disabled without key repetition for vim. It also seems to act slightly funky between apps for the "scroll speed/delay" sensitivity. It works fine in vim now, but somehow it's very sensitive on slacks app and browser. (but not VS code)
I guess I'm just used to keep my hand mostly on keyboard, and would like to use mouse/touchpad as little as possible.
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... after about a minute of searching.
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)
I’ve never really understood why caps lock gets a huge key in the middle of the keyboard, while control gets a regular-sized key at the bottom. Generally speaking, caps lock is used much less than control.
If strain wasn’t an issue, Esc would be my next choice.
I mean, you can press alt+tab quickly. But I like the simplicity of one button.
TouchCursor sometimes is deactive and then after a few seconds again it works again...
At work (MacBook Pro), things get a little hinkier:
- I map capslock to command
- in iTerm2 only, I swap command and control.
This means I can use the honking big key to the left for my cutting/pasting/window-switching needs when not in the terminal, and still use my muscle memory for Vim and the command line when I am in the terminal.
The (not insignificant) downside is having to remember to use the physical control key (rather than capslock or physical command) for copying/pasting/window-switching when in the terminal: but I can live with that.
I also had to disable iTerm2's default command-W shortcut for closing tabs, as I kept hitting it by accident when trying to ^W on the command-line.
Separate but still (just) related point: I've had to train myself to use ^[ for Escape in the terminal (especially in Vim), as the escape key on the MacBook Pro's touchbar is next to useless. I guess could have just mapped capslock to Escape, but having that big fat control/command key is just too useful.
For those that don't know, there are a handful of control key sequences that perform basic cursor movements that are the same in Emacs, bash, zsh, and every text pane in Mac apps. Using caps lock as a control key makes this very pleasant.
I am unlikely to give up this habit since I despise moving my hands from the home row to use arrow keys -- for me, this is the main pain point when switching between Windows and Mac several times per day.
But: every comment in this thread that uses a bad word is at best misguided, while comments without bad words are informative and keep the general mood in check.
I know people tend to bypass word filters by occluding letters ("B*rcelona") while retaining meaning; but maybe a word filter would cut dang's work by $A_LOT %.
As far as the Alt- switching goes.. that was honestly one of the more difficult things to solve for both Linux and Windows. For Linux because of the sheer number of DEs (a few absolutely hated it to allow certain remapping, had to send in patches for one of the DEs too!) and Windows because it initially appeared that the most simple remapping methods would clobber each other - but after working with Autohotkey enough it was apparent that it was indeed up to the task & I also kicked Sharpkeys registry hacking off to the side and no longer needed users to log off and back on. (Also makes pair programming a bit easier too.)
Needless addition that nobody asked for: Having recently switched to Ubuntu from MacOS as my primary development environment, I very much felt the pain of losing many keyboard shortcuts I had grown accustomed to (amongst other subtle things, like the really good default PDF viewer in MacOS, and yeah yeah yeah I know there are Linux alternatives). I ended up installing a jetbrains marketplace plugin that as-best-as-possible mimics the MacOS bindings and then just re-learned the rest and.. it wasn't TOO bad, probably a week or so of feeling like a limb was missing.
The hotkeys in the drop downs will not always line up - but that’s the price for this implementation.
I think "readline-style controls" refers to a more letter-based approach, instead of special keys? i.e. ^a, ^e, ^w...
I do not yet have a method though to help you easily keep your changes when upgrading to newer Kinto versions. I will try to add a git like merging ability to the updates later on though, so custom local changes will be preserved.
I have an ahk script that's have a more general approach which maps window key to ctrl. It also remap the text navigation and mac style window switching.
https://github.com/stevenguh/autohotkey-windows-mac-keyboard
I’m sure your project is good but I think Kinto is better fleshed out than you’d assume.
Also your Windows key, in Kinto, tends to land on the physical Ctrl key during a normal GUI app or non-terminal. Ctrl+P is otherwise on your Cmd key location.. as are all primary modifier combos tend to be.
It does not interfere with or lack any particular remapping that I am aware of.
The copy and paste in terminal was annoying at first, and used to remap it to super-c super-v but then I embraced it and doesn't seem to bother the context switch when I am back on OSX.
The only difference for me between linux and osx is the fonts.. not sure why but alas i start to get use to to the linux fonts, i used to really be bugged about it before.
It seems my muscle memory is application dependent, i.e. I never hit ^C when I intend to copy in a terminal. On the other hand I might hit Ctrl+Shift+C on browsers once in a while if I am switching context a lot... ;)
Unfortunately this requires X11 anyway :(
now if I could only override some of the application shortcuts that can't be changed (like ctrl-w closing a tab or window)
On windows with a windows keyboard, the lcontrol button is easier to press because it is in the corner.
The Author
Windows/Linux - Primary, Tertiary, Secondary, Spacebar
Mac - Tertiary, Secondary, Primary, Spacebar
A thumb driven Primary modifier is nice, but beyond that hotkeys trip over each other less during terminal usage. The arrow keys w/ modifiers and emac style binding are highly useful for programmers and terminal users as well.
Similarly, I would preface some programs in the Start menu with a unique number; e.g., Win, P, 1 opened File Explorer; Win, P, 2 opened the Command Prompt, etc. With the Windows 10 start menu, I just start typing, but it sometimes exhibits weird behavior, where it finds what I want after one or two characters, then changes to the wrong thing after I type another (correct) character.
I generally prefer the Cmd-Tab / Cmd-Tilde split on macOS to the Alt-Tab on Windows. However, after all these years, I still can't always predict which window is next--will I go back to the window I was just on, or keep going forward to another one?
sarcasm aside, I wish there was something that was the exact opposite. I tried to map cltr+c/v on OSX but it doesn't work on some applications, like firefox. And using Switch application that fixes alt+tab to all windows (not programs) for some reason the default shortcut (Option-tab) is stolen on iterm2 which is exactly where I wanted it to work.
man, having to use OSX at the office is like having to use Windows with Outlook in the past. So silly.
I guess you have tried Karabiner-Elements[0] to help remap the keyboard? It's infuriating that it doesn't work properly in all the apps. Especially the browsers all seem to map their own keyboard shortcuts or hijack keys. If you use IntelliJ then that's a whole nother level of pain to try to map properly. I don't think I have ever succeeded in making arrow key movement inside text fields work consistently across all applications on a Mac.
Another app I think is a must is the BetterSnapTool[1]. It's the only app I've found that does a reasonable job of snapping like Windows. There are dozens of other ones, but none of them work quite properly. BetterSnapTool doesn't either, for example you can't snap a window from a half to a quarter and back up to a half again, then restore it back to the original size before you snapped. But you can snap it to half, full and original size. Most of the other tools on Mac don't remember the original size.
I also like uBar[2] to get rid of the dock and replace it with a more useful task bar. It's not as good as the one on Windows 10, but if you're forced to use a Mac for work then pretty much anything helps.
[0] https://karabiner-elements.pqrs.org/
OSX is like using windows in the 90s. You need a dozen weird apps for basic stuff.
iterm2 still steal Option-tab on all of them.
and replacing command-tab breaks in other apps.
There's no solution other than to suffer it.
Disguising this move under the banner of 'be different'™, mac-lackeys immediately went to work spreading the gospel of 'it's better because it's closer together'.
Ultimately there already was an international standard, there is value in keeping practices standard, and Apple was the one who broke the standard. It should not be celebrated, it should be ridiculed as the shameless cash-grab trap that it is.
Instead of making an app for every platform out there that makes that platform more 'mac-like', there should be an app for mac, that makes that platform behave like the established standards.
OFC Apple don't allow such modifications, because what they say goes, and what they do, apple-fanboys will like anyway.
I think most commercial keyboards (just about all laptops) are terrible and If there really are international keyboard standards, they’re not great design. I personally think all keyboard layouts are ultimately wrong because the underused caps lock is in prime real estate and should be replaced by the CTRL key (check out the ADM-3). As for Macs requiring a certified keyboard, that’s just plain wrong.
The ultimate gripes come down to key placement and window manager shortcuts, both of which can be modified on either OS.