5 ms·
In 2019 you still cannot get a decent macOS-like modifier key setup on Linux where OS-keys are mapped to Super (e.g. Super-C being copy) and such that Control w
by JulianWasTaken 7y ago
In 2019 you still cannot get a decent macOS-like modifier key setup on Linux where OS-keys are mapped to Super (e.g. Super-C being copy) and such that Control works like it does on macOS, so I still always find these kinds of articles nice but you're in for lots of surprises if you try to switch.
And I say this as someone with both macOS and Linux laptops that I work from, but because of the above and other similar things I think you're always up for disappointment if you expect to get Linux to be exactly like macOS.
- brightball 7y agoWhy not just get used to the default CTRL + SHIFT + C instead of Super + C for use in the terminal? When I switched over from Mac my initial thought was “get this working like my Mac”. After about a day that changed to “learn the Linux way.” Switched 2 years ago and the only thing I miss after 10 years on OSX is OmniGraffle.
- ukj 7y agoThat gets your hand away from home row. I have gone the other way. One of the thumb-buttons on my Ergodox EZ is"Super + C" makro. The other is "Super + V". One-thumb copy/paste.
- glandium 7y agoWhat's annoying with Ctrl+Shift+C is that it's not the same as other applications, where it's Ctrl+C. On Mac it's Command+C everywhere.
- guntars 7y agoThis is my gripe too, as someone who’s recently switched back to Linux after a 10 year OSX hiatus. My current Linux system is designed and developed by thousands of developers who were just trying to get their stuff working for them, each of them working on a small piece. OSX has a lot more consistency because it was decreed by a few UX designers, alas, that is the price you pay for flexibility.
- ageofwant 7y agoYou apply the consistency, you degree what you want. People decide to use Linux and still expect to be told what they want. Decide what you want and make it so, Linux is fundamentally a user-centric system and for it to work best it needs a creative guiding force in the middle: you, the user.
- zapzupnz 7y agoI'm not sure this really addresses the point. macOS manages to have both user-configurability for keyboard shortcuts and consistency out of the box. On macOS, you can also define consistent keyboard shortcuts universally and per-application. This is achieved via a very simple interface in System Preferences -> Keyboards -> Shortcuts. This will apply to all applications because they must all respect and populate the macOS menu bar, the mechanism through which keyboard shortcuts and processed and thus made modifiable. Easy, friendly, user-centric. But on Linux? Good luck. Between all the various user interface libraries with their own mechanisms for defining and modifying keyboard shortcuts, not to mention those apps that hardcode the shortcuts in order to avoid the utter mess of the mixed desktop environments that so many users are forced to use in order to get certain jobs done. In this sense, Linux is not a user-centric system because nobody who makes a distribution, even the better ones, gives a toss about the user; it's all about the developer's manifestos and freedoms long before it's ever about the user. The average user who just wants to work, not sit there slaving over a billion different and wildly inconsistent configuration file formats each in different locations, who just wants the damned Copy command to require the same two-finger salute in one program as another, is resolutely not the one being catered for. Linux distributions are just as opinionated as Windows and macOS; DIY distros are utterly irrelevant to the vast majority of people, including the HN crowd who, just like the technically illiterate we sometimes hold our noses up to, also have lives to live.
- ufo 7y agoOn GNOME terminal you can remap the copy and paste commands to Ctrl+C and Ctrl+V. If you do this, you can use Ctrl+Shift+C to stop a running command. I think some other terminal emulators might also let you do this.
- rzzzt 7y agoSelecting text immediately copies it to the clipboard, and middle mouse button pastes. I think this works across terminal implementations.
- bitwize 7y agoBecause Ctrl is for sending control codes, Command is for issuing commands. You need to have one keystroke that means "copy", "paste", "print", help, etc. everywhere in the system. Only macOS gets this right.
- lightbulbjim 7y agoIsn’t Ctrl+UpArrow the default Mission Control shortcut? I too prefer the MacOS copy/paste shortcuts, but I find that MacOS and Mac apps mix up Ctrl/Cmd just like other systems.
- cycloptic 7y agosetxkbmap -option ctrl:swap_lwin_lctl -option ctrl:swap_rwin_rctl
- shpx 7y agoIt's not as simple as swapping the keys. On macOS you use the "win key" for system shortcuts but you can also use the Ctrl key for emacs-style movement systemwide. For example I can type Ctrl-b while editing the URL in the browser omnibar to move the cursor back a character or alt-b to move it back a word, just like you can in the terminal and then use "Win"-b to bookmark a page. And your command changes the keys you use for moving the cursor in the terminal.
- jbverschoor 7y agoYeah mac keybindings are pretty awesome, and there's a lot of not so obvious shortcts (keyboardwise, but also GUI)
- cycloptic 7y agoIn GTK2 and 3, you can switch to the emacs key theme and then edit the files in /usr/share/themes/Emacs/ to have meta instead of ctrl. Alternatively, use a key rebinding daemon like https://github.com/snyball/Hawck https://github.com/snyball/Hawck to rebind the specific keys globally. Long-term I don't think this is worth it though because the programs are not built to support it like they are on a native Cocoa environment. You kind of just have to suck it up and get used to different key bindings in different environments.
- deleted 7y ago[deleted]
- shpx 7y agoNo one wants to fiddle with keybindings. Occasionally using Ctrl-c in the terminal (which forces me to redo my text selection or worse) or Ctrl-Shift-c in the browser (which brings up the dev tools that I have to close with Ctrl-Shift-i) is just the cost of using Linux. MacOS's system is a better system that will never be adopted because there no will (just suck it up as you say), market pressure or authority that would impose it.
- sandGorgon 7y agoAll Linux and Windows OS follow the IBM CUA standard (https://en.wikipedia.org/wiki/IBM_Common_User_Access https://en.wikipedia.org/wiki/IBM_Common_User_Access). All of them honor Ctrl+Insert for copy and Shift+Insert for paste. This will work on browsers, editors , shells, etc. FYI this will also work on Windows XP cmd. Linux has its own set of standards that has evolved to work on keyboards that do not have the super modifier (e.g. in India), but has far more consistency built into it that the Mac
- maratc 7y agoThe problem with the Insert key is it's nowhere to be found on 99% of the laptops, thus rendering the IBM CUA standard moot.
- walshemj 7y agoI just looked down at my Dell lap top and found the insert key with no problem
- zapzupnz 7y ago> It works for me!
- sandGorgon 7y agoActually it's the other way. 99% of laptops have an insert key. MacBook and it's wannabes (xiaomi,etc) are the only ones that dont.
- maratc 7y agoThis way or another, the IBM standard was authored in 1980s with major IBM systems (mainly MS-DOS and OS/2) in mind, and it has not aged nicely. Windows mostly went its own way. Keys like F1-F10, PrtScn, PgUp/PgDn have never been easy to find or use on laptops (or anywhere except 101-key keyboards). Start or Win modifier key, on the contrary, is universal, but Linux ignores it for the most part. The only consistent system around is Mac OS X, where Cmd-C is universal copy, Ctrl-C stops the current program in terminal, Cmd-V is universal paste, Ctrl-V opens a vertical block in Vim, Ctrl-A goes to the beginning of the line, and Cmd-A selects all. This works anywhere, from browser to terminal.
- elcritch 7y agoI just installed Pop OS!, and while not perfect, it sets a lot of default super keys which you can turn off and set the super variants in Gnome shell, etc. Unfortunately I still haven't gotten emacs-like ctrl-a to work by default, though I've tried. Especially in Firefox which doesn't seem to follow any Gtk settings.
- lightbulbjim 7y agoGnome has an “enable Emacs key bindings” option which will enable readline shortcuts. Can’t remember whether it’s in settings or the tweak tool.
- mandarg 7y agoThis has been my experience exactly. I switched from Linux to OSX/MacOS around eight years ago, and the better and (to me) more intuitive modifier keys have been one of the features that have kept me there; along with the convenience of Emacs/Readline keybindings for text editing everywhere. Getting keybindings to work the same way in Linux currently involves a Rube Goldberg setup of GTK3 key themes [1] and AutoKey [2] for me, and some things still don't work right (Super-W closing a single tab in Firefox/Chrome, etc.) Also, it looks like key themes are going away in GTK4 [3]. The Hawck daemon cited elsewhere in the conversation looks promising, maybe that'll work better. [1] http://shallowsky.com/blog/linux/gtk3-emacs-key-theme.html http://shallowsky.com/blog/linux/gtk3-emacs-key-theme.html [2] https://github.com/autokey/autokey https://github.com/autokey/autokey [3] https://gitlab.gnome.org/GNOME/gtk/issues/1669 https://gitlab.gnome.org/GNOME/gtk/issues/1669
- aplaice 7y ago> Super-W closing a single tab in Firefox If, in about:config, you set ui.key.accelKey to 91, then Super-W will close a single tab (and Super-T will open a single tab etc.). This obviously won't work in Chromium, though.
- gricjeh 7y agoIt’s weird to me to use Super to close a tab rather than for the desktop environment. Super is very consistent on my DE of choice: it’s not for application specific keyboard shortcuts, but for keyboard shortcuts of the window manager. That way there are never any collisions and things are easy to remember.
- mellett68 7y agoInteresting to read this. The reason I didn't get on with macOS is the extra modifier keys. It was a relief when I didn't have to use a mac for work anymore.