11 ms·
I so wish the Linux community would get its act together and implement a working usable clipboard. It's the one thing I miss the most whenever I switch from Mac
by jwr 8y ago
I so wish the Linux community would get its act together and implement a working usable clipboard. It's the one thing I miss the most whenever I switch from Mac OS to Linux.
On a Mac, you can cut/copy/paste using predictable keystrokes in any application, anywhere. And there is a single clipboard. On Linux, you have to deal with a multitude of behaviors (middle mouse button, Ctrl-C, others, and does it paste where the cursor is or do you have to click the middle mouse button exactly where you want stuff pasted, etc).
And I'm not even talking about multiple media types: all I need is plaintext.
The second dream wish would be for consistent keybindings in all text input boxes, like in Mac OS. Such as make Ctrl-A always go to the beginning of line, Ctrl-E always to the end, and Ctrl-K always kill whatever is in there.
If I had that, I think I could use Linux without getting annoyed every couple of minutes. I would still miss apps like TextExpander, flawless drag&drop, and lots of other things, but I could at least use it without frustration.
Unfortunately, none of this is likely to happen. If you wonder why, it's enough to look at the responses that will surely land here:
- devereaux 8y agoyou can do that with xdotool if you want to paste the xbuffer. I suggest handling the shortcuts at the window manager level. this force ctrl-c to always do copy - even in the terminal, but nothing stty can't fix quickly - I use ctrl-x instead as it is close by. end result, my ctrl c and ctrl v work as you would expect -- always!
- shmerl 8y agoThere is wl-copy / wl-paste if you are using Wayland compositor.
- devereaux 8y agoI'm using xorg but very interested in Wayland. My main "fear" with wayland is that my scripts to properly handle things like a uniform copy/paste will stop working Would you have some links? I am especially interested in ways to handle shortcuts like with autohotkey on Windows: a context dependent remap (ex: pressing a given physical key may send ctrl-tab in an application, but ctrl-pagedown in another if said other application doesn't support remapping shortcuts)
- shmerl 8y agoHandling shortcuts would be compositor specific. Unlike X, the display server part with Wayland is implemented by the compositors. Wayland itself is just the protocol. KWin for example allows setting various global shortcuts: https://docs.kde.org/trunk5/en/kde-workspace/kcontrol/keys/index.html https://docs.kde.org/trunk5/en/kde-workspace/kcontrol/keys/i... For wl-copy / wl-paste, see: https://github.com/bugaevc/wl-clipboard https://github.com/bugaevc/wl-clipboard
- devereaux 8y agoWould you recommend a given compositor to have something close to LXDE or any other minimal window manager in xorg? I'm thinking about starting with weston and moving to sway if it doesn't do the job
- shmerl 8y agoSway is probably an interesting option to try, if you want something minimalistic.
- noahadavis 8y agoIt won't happen because Linux users like it the way it is. It is consistent, it's just not the way you want it to be. I love middle click paste. It makes sense that it doesn't follow the text cursor because the mouse is separate and this adds extra flexibility. Ctrl+A should select everything and put the cursor at the end. Actually, in some apps the cursor disappears and in some the cursor goes to the end, but the behavior of what happens when text is selected is always the same.
- deleted 8y ago[deleted]
- rezeroed 8y agoWhat's a "middle click"?
- sangnoir 8y agoClicking with the middle mouse button - nowadays, it's typically a clickable scroll-wheel, but it used to be a plain button between left and right mouse buttons back in the day.
- AnIdiotOnTheNet 8y agoAfter mice had mostly standardized on two buttons but scroll wheels didn't exist yet, it was common to map a simultaneous click of both mouse buttons to simulate a middle click.
- jake_the_third 8y agoA way to insert X11's "clipboard" buffer (i.e text that is currently selected text). I agree with GP: I find the two separate copy-paste methods very useful and wouldn't want to see them merged. Users who aren't aware of one of the aren't affected, and those who are get an extra buffer to use.
- dredmorbius 8y agoAssumes a three-button mouse: http://ecx.images-amazon.com/images/I/513VKV7DZBL.gif http://ecx.images-amazon.com/images/I/513VKV7DZBL.gif Usually a scroll wheel, now.
- _emacsomancer_ 8y agoThere are clipboard applications which will pull everything into a single clipboard. KDE Plasma, for instance, has a great built-in clipboard which does this and which also handles at least images as well. > The second dream wish would be for consistent keybindings in all text input boxes, like in Mac OS. Such as make Ctrl-A always go to the beginning of line, Ctrl-E always to the end, and Ctrl-K always kill whatever is in there. For this, you should really just run Emacs. But this isn't a Linux issue really, but a more general 'problem' of competing conventions (Emacs, vi, CUA, etc.) for keyboard shortcuts.
- dubya 8y agoThe issue is that on a Mac, the conventions work in (almost) any app, in any text entry area, and it's frustrating to not have that work. For example, Excel violates this convention for formula editing, and it's really grating to edit using only left, right and backspace. Probably MS has their own conventions, but I don't use Excel enough to learn them. Command line apps and things like MacVim are obviously a different story. The controls are actually a little strange, because they aren't well documented or discoverable, and don't seem to be configurable, unlike most other shortcuts.
- _emacsomancer_ 8y agoI do agree that it's frustrating not to have this functionality everywhere. (One minor trick to make some of it a little less painful is that in CUA mode [i.e. MS mode], for Control-A, Control-E, you can type Control-A (=select all) and then Left to jump to the left edge, and Control-A and then Right to jump to the right of a text box).
- ams6110 8y agoIt's a NEXTSTEP legacy. Any MacOS application that uses the standard UI text field classes (NSText, NSTextView, etc) will get the emacs-like key shortcut behaviors. The NS prefix on those classes means "NEXTSTEP" Microsoft Office probably implements its own text box classes so it's different.
- 8y ago
- ad_hominem 8y ago> On a Mac, you can cut/copy/paste using predictable keystrokes in any application, anywhere Interesting, because Linux is my daily driver, and when I borrow my spouse's MacBook one of the things I get tripped up on is some programs seem to use Ctrl+C/V and other programs use Command+C/V for copying/pasting
- pdpi 8y agoWait what? What programs are you using that use Ctrl for clipboard actions? Do they also allow their Cmd equivalents, or are they just using the wrong keys?
- jeena 8y agoAs far as I remember, Terminal, iTerm2.
- pdpi 8y agoJust double checked — neither iTerm not Terminal allow the Ctrl modifier for clipboard operations. In fact, terminal applications are _precisely_ the applications I use to argue that Cmd-X/C/V is overall nicer, as they don't interfere with the usual meaning of the Ctrl modifier as a way to produce control characters (which are especially useful in the context of a terminal)
- jeena 8y agoHm, perhaps you're right, it was some time ago I used a Mac, sorry for the confusion. There was something with Emacs also which was weird on the mac with modifier keys but I don't exactly remember what.
- carlmcqueen 8y agoI've only see this in parallels when using a windows application. So if you have windows office because it has traditionally been better than the one offered to mac you'd have to remember to use control instead of command.
- diffeomorphism 8y agoIronically the "consistent keybinding" you mention are emacs keybindings. On linux you basically have 3 common bindings: emacs, vim and cua. One piece of advice: In your clipboard manager you can check a box to sync the middle click and ctrl+c buffers, if you want a single clipboard.
- riazrizvi 8y agoOn MacOS the keybindings are configurable via DefaultKeyBindings.dict file. Emacs by default, but I use Vim like key maps. Most important, these settings propagate to all 3rd party apps that use the built-in text UI components. You simply need to restart the app, not the whole system. It’s very powerful.
- ptero 8y agoJust as a nitpick: communities can (almost) never "get its act together", as they are comprised of people with different preferences who do not want to abandon their preferences for some abstract common good. On a more substantive note (globally consistent actions from keystrokes). It would be great, but not going to happen because there are established modes where the same keystrokes lead to well known results. And those actions are different depending on the application. Maybe it would be good if this was not the case, but that ship has sailed a long time ago. MacOS is in sync because its BDFL (Apple) forces it to. Example: Ctrl-Z. In a terminal, it suspends a process. In most GUI editors it performs undo. Shall we force a global standard? I would pay to watch a user get its editor suspended when he presses Ctrl-Z to undo a typo. Did the program crash? Let me start it again ... what does it mean it is already running?? Where are my edits??? I'll just reboot the machine! So agreed, global synchronizations that would force this to happen are unlikely. Fortunately. My 2c.
- yjftsjthsd-h 8y agoThere's also complication that there's more than one standard. It's the same reason that emacs doesn't use conventional shortcuts even when it's running in a GUI: it's been using its current conventions since before the invention of the conventions that are now more popular. Similarly, if we just want to go by "preexisting standards" then really it's those newfangled applications that have hijacked ctrl-z to do anything other than suspending a process that are to blame.
- kps 8y ago> it's those newfangled applications that have hijacked ctrl-z Yes. Windows botched this by hijacking the Control key, and the desktop-Linux crowd are unable to do anything but imitate Windows. Pre-Linux GUIs didn't have this problem, and MacOS doesn't have this problem.
- swiftcoder 8y agoHow hard would it be to adapt a linux distro to have separate keys for control/command (a la MacOS). This is my single biggest blocker against using Linux as my daily driver - not having consistent keybaord shortcuts that avoid collision with terminal interrupts.
- ams6110 8y agoI like using autocutsel to manage the clipboards. Description: Autocutsel tracks changes in the server's cutbuffer and CLIPBOARD selection. When the CLIPBOARD is changed, it updates the cutbuffer. When the cutbuffer is changed, it owns the CLIPBOARD selection. The cutbuffer and CLIPBOARD selection are always synchronized. With this, I can highlight text (which is an implicit "copy") or use CTRL-C and paste with middle-click or CTRL-V (or in emacs, CTRL-Y) and it all works. The only weirdness is in Google Docs, which seems to hijack CTRL-C, CTRL-V, etc. for its own handling.
- ufo 8y agoIf you pretend that the "middle mouse button" clipboard doesn't exist (it is a feature that many are not even aware of) you then using the the regular one instead is a piece of cake. In Linux, all applications use Ctrl+C and Ctrl+V. The exception is inside the terminal, where you need to use Ctrl+Shift+C and Ctrl+Shift+V (due Ctrl+C already having a meaning there).
- rkangel 8y agoThis is my experience too.
- kilburn 8y agoI spend somewhere around 30% of the time in a terminal, and the remainder outside of it. I am a former mac user, and after a year and a half the Ctrl+Shift+C thing still drives me mad. Shortcuts are just better on the OSX side of the fence (not perfect, but way better). IMHO, global actions (copy, paste, select all, cut, undo, redo, etc.) should be mapped to one modifier (say AltGr) and local actions to another (say Ctrl). The most important part of this scheme would be that "global modifier + key" has an unsurprising result that is consistent system-wide. Then "local modifier + something, or modifier1 + modifier2 + something" can do whatever the app wants. This would improve things immensely IMHO...
- jenscow 8y ago> the Ctrl+Shift+C thing I don't know about others, but with terminator[0] I'm able to map Ctrl+C to copy - but if nothing is selected, then ^C works as normal. Is that what you're looking for? 0: https://gnometerminator.blogspot.com/p/introduction.html https://gnometerminator.blogspot.com/p/introduction.html
- ufo 8y agoIn GNOME Terminal you can go to the keyboard shortcut settings and rebind ctrl+C to copy and ctrl+V to paste. If you do so, then you can use Ctrl+Shift+C and Ctrl+Shift+V to do ^C and ^V. Not quite that "selection aware" behavior, but close enough. From the terminal's point of view, Ctrl+C and Ctrl+Shift+C do the same thing. The only reason you can't usually use Ctrl+Shift+C is that by default that combination is intercepted by gnome-terminal to mean "copy". (I wouldn't be surprised if other emulators with configurable keyboard shortcuts let you do a similar thing).
- molteanu 8y agoWell, of course you can have consistent keybindings. You can define them yourself: https://github.com/mooz/xkeysnail https://github.com/mooz/xkeysnail
- kurtisc 8y ago>I so wish the Linux community would get its act together That's needlessly rude.
- dpark 8y agoNo it's not. From his standpoint, the clipboard situation is broken. It's reasonable to state his viewpoint. Especially given that he's addressing a large community and not a small set of individuals, it's borderline absurd that someone would take personal offense at his statement. It's unreasonable to expect that criticisms be phrased politically to avoid stepping on oversensitive toes.
- kurtisc 8y agoI'm not saying asking for a different clipboard situation is unreasonable, I'm saying the phrasing is rude. Telling someone or someones to get their act together is saying they're incompetent or ineffective. It's needless because most of these someones have no financial interest in winning this poster as a user but the poster phrases it as if failing to do so is failing to be competent. >It's unreasonable to expect that criticisms be phrased politically to avoid stepping on oversensitive toes. If you mean politely then no, it's not unreasonable to phrase criticisms rudely. It's unreasonable to phrase them rudely and then expect the recipient to do anything about it. edit: Also, I said _needlessly_ rude. Are you saying the poster needs to be rude?
- dpark 8y agoI’m saying your interpretation of “rude” is overly sensitive. If I say “The USA needs to get its act together and fix its broken immigration system”, I don’t see this as particularly rude. By criticizing the immigration system, I’m already saying that it’s fucked up. The fact that I use the phrase “get it together” is irrelevant to both tone and content. And again, the subject is a large group. The idea that particular individuals should take offense at such a mild blanket statement feels kind of ridiculous.
- 8y ago
- thomastjeffery 8y agoI suppose you could use your window manager to bind super+[xcv] to your favorite clipboard program. Personally, I love that all the software I have used in Linux does nothing to encroach on my super+* keybindings. I also love having a secondary clipboard that feels more permanent (ctrl+xcv), while having a quick and dirty one (select middle-click)
- jwr 8y agoOh, don't even get me started on keybindings. There isn't even a good way of setting them up anymore, because there are multiple layers and systems that deal with keyboard events. It used to be that you could get reasonably far with xmodmap, but that is no longer true. And good luck trying to get expansion functionality (e.g. a keystroke that generates several keystrokes). Also, some context before I get flamed for being a newbie: I've used Linux since before 1.0 (that's 1993). My usual working keyboard setup pretty much requires a Super key and a Hyper is quite helpful, too.
- mmphosis 8y agoI swap left Alt and left Ctrl because my ancient "Mac" muscle memory expects a Control key and Command key in those places. I actually swapped the physical keys on the PC keyboard as well. alias x='/usr/bin/setxkbmap -option ctrl:swap_lalt_lctl' That makes most Linux software consistent with Mac Command keys. I still need to use Alt-Tab where I expect Command-Tab (control-tab) to switch to the next Application window because Autokey doesn't seem to be able to override this. I installed Autokey and have keys assigned for Terminal. So for instance: pressing <alt>+c sends a <ctrl>+c, and pressing <ctrl>+c sends <shift>+<ctrl>+c. I have pretty much all of the alt keys assigned to send control keys, and all of Command keys (control keys) to do what I expect: Close ^w, Copy ^c, Find Next ^g, Find ^f, New ^n, Paste ^v, Select All ^a.
- amyjess 8y agoHonestly, I hate middle-click paste and would much rather use the middle mouse button for autoscroll. Middle-click paste has just made me terrified of ever pressing the middle mouse button for fear of sending PII to somebody.
- dgzl 8y ago> I so wish the Linux community would get its act together and implement a.... The Linux communities are full of volunteers. It seems like their act is actually quite together! There is no 'buyer' to make demands with their dollar. Only there is a developer who one day decides they want a feature.
- pseudalopex 8y agoThe Linux community also includes Red Hat and Canonical.
- KaiserPro 8y agomiddle button paste works almost everywhere, apart from when webdevs do clever things. as for consistent keybindings, I feel you on that. However your example is a bit flawed. home/end keys do what you want, and ctrl left/right does word skipping.
- ketralnis 8y ago> I so wish the Linux community would get its act together and Be the change you want to see in the world. Open source developers are volunteers scratching their own itches, working on their own time. I wish someone would come build me a house for free too, and if they did I'd be hard pressed to complain about the number of windows.
- AnIdiotOnTheNet 8y agoBut you might be inclined to complain about the leaking roof, the Escher-esq plumbing, or that the appliances only come in diy-kits with half the parts missing. The thing about Linux is, there's all these evangelists out there who insist that everyone should use Linux (or that they are superior to you for doing so) and, when you tell them why you don't, insisting your preferences are wrong, your workflow is wrong, it works for them so you're a liar, or you should fix it yourself. If it weren't for those people, I think the attitude towards Linux would be more like it is towards Haiku. No one really complains about it, they just don't use it.
- hedning 8y agogtk supports emacs style bindings. Put `gtk-key-theme-name = Emacs` under `[Settings]` in ~/.config/gtk-3.0/settings.ini. Doing `gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"` might help too. That will work in firefox/chrome too.
- igneo676 8y agoAnd the workarounds for multiple clipboards are SO painful. Disabling the extraneous ones is impossible and syncing them works until it DEFINITELY doesn't. I've had better luck over on Wayland, thankfully
- waddlesplash 8y agoHaiku uses home/end to jump to beginning/end of line like Windows/Linux does, but you can rebind those keys. There is also only one clipboard, and none of the "primary paste buffer / selection buffer / etc." nonsense, either. So ... the dream is alive on Haiku, anyway. :)
- colvasaur 8y agoI used to be irritated by middle-click paste as well. That stopped when I had someone explain it to me as follows: > It’s just another clipboard. One clipboard is interfaced via the keyboard. One clipboard is interfaced via the mouse. Perhaps that’s common knowledge, but that understanding made me instantly fall in love with middle-click paste. In most terminal emulators, Ctrl-C deviates from normal behavior in favor of sending SIGINT. However, some terminal emulators (e.g. the one in elementary OS) makes the simple decision that if text is highlighted, copy it. Otherwise, send SIGINT. That closes all loose ends for me.
- arh68 8y agoI agree in whole, but > On a Mac .. there is a single clipboard. There are 3 clipboards, at least. Cmd-C/Cmd-V most everywhere, Ctrl-K/Ctrl-U/Ctrl-Y in most text fields, and select/middle-click in Terminal.app. It's like having 3 hands, I find it works well.