Remix.run Logo
lucideer 6 days ago

> The universality of copy/paste is overrated. It's literally just adding shift in terminal emulators, no biggie.

I used to think this before I got a job in a Mac-only company. I've since installed Toshy on every Linux machine I own & the difference is night & day. Having to do something extra for terminals to achieve the thing that's so simple & natural (& frequent) in GUIs just feels like terminal emulators are being treated like second class citizens among the installed apps. Having the same shortcuts "Just Work" in exactly the same way through all apps isn't just more convenient, it feels like the OS is elevating terminals to an equal tier of integration.

Which I would've really expected more Linux users would value more than they seem to.

JoshTriplett 6 days ago | parent | next [-]

I learned Ctrl-C for "kill program" very nearly before Ctrl-C for copy existed, and long before it existed on any platform I used. I value consistency, but I also value consistency with common practice for the type of application I'm using.

The common failure mode, for me, isn't hitting Ctrl-C for copy in a terminal by mistake, it's hitting Ctrl-Shift-C for copy in a browser and ending up with the console open, or hitting Ctrl-W to delete a word and having it close a tab.

Svip 6 days ago | parent | next [-]

Kind of wish Firefox allowed one to modify the common keyboard shortcuts in the browser. But considering the open issue on the matter, I won't keep my hopes up: https://bugzilla.mozilla.org/show_bug.cgi?id=57805

The hacks about seems to be basically steal keyboard shortcuts the same way webpages already do; either through an extension[0] or modifying config-pref.js[1]. Neither of which seems very appealing to me. Though, funnily: I did hit Ctrl-W writing this message to delete a word; thank goodness for cache.

[0] https://addons.mozilla.org/en-US/firefox/addon/shortkeys/

[1] https://old.reddit.com/r/firefox/comments/kilmm2/restore_ctr...

Galanwe 6 days ago | parent | prev [-]

This drives me nuts as well, the number of times I close a tab with C-W, or select all with C-A...

My brain can "switch mode" when on a regular web page, but if I open some kind of "terminal in a page" (i.e. I the AWS console), then I'm 100% it will end up with a C-W.

JoshTriplett 6 days ago | parent | next [-]

For me, it happens most often when I have a call open in a browser in one window, and a terminal open on the other half of the screen taking notes, and then switch to the call and start typing something in the chat.

koiueo 6 days ago | parent [-]

I'd say Ctrl+W is just a terrible shortcut for closing a tab.

It's right near Ctrl+Q, which usually quits an application.

While Q is mnemonic, W is not.

It's too ergonomic and requires very little wrist movement for such a destructive action.

I understand your pain, but I blame the author of this weird convention for the "close tab" action, whoever they are

oniony 5 days ago | parent [-]

I think it came from the close window shortcut on Windows back when browsers didn't have tabs.

nyarlathotep_ 4 days ago | parent | prev [-]

> This drives me nuts as well, the number of times I close a tab with C-W, or select all with C-A...

I've lost countless SessionManager terminal sessions this way on Windows and Linux.

doix 6 days ago | parent | prev | next [-]

I have the exact opposite problem on a Mac. Things don't just work. You can select text in the terminal and then middle click to paste it. But that only works in the terminal, not anywhere else.

Catches me out a bunch. There is also only a single copy buffer, so to copy from the terminal and paste into a browser I need to replace what was in my clipboard, drives me insane.

> Which I would've really expected more Linux users would value more than they seem to.

Because you get used to it and then don't think about it. I value having two copy buffers over consistency for the sake of consistency.

trinix912 6 days ago | parent | next [-]

A clipboard manager solves all of this and doesn't break the consistency and expectation that the same shortcut copies/pastes to/from the same place.

doix 6 days ago | parent [-]

Which one do you recommend? I tried multiple when switching, but none of them quite worked right. I want:

* Two seperate buffers

* Separate shortcuts to paste them

* Selecting text _anywhere_ automatically puts it into the second buffer

I couldn't find anything that did this, so I just gave up and deal with it on my work laptop (and occasionally whine about it on HN when it comes up)

lucideer 6 days ago | parent | prev | next [-]

> You can select text in the terminal and then middle click to paste it. But that only works in the terminal, not anywhere else.

I guess this is likely an odd affordance to unix norms rather than a planned/intended shortcut (I've never tried it & never knew it worked anywhere). I'm not much of a mouse user in terminals though so I guess it would just be a little less natural.

pinoy420 6 days ago | parent | prev [-]

Command c command v works fine for me because I don’t “optimise” my experience.

It’s a fun game to do I guess but if you become “more productive” by having a slightly quicker mechanism to find a file through 9 different chords on your terminal only interface - you likely aren’t solving problems that are worthwhile.

doix 6 days ago | parent [-]

I've heard this opinion worded slightly different many, many times over the years. I just can't agree with it. You're going to spend thousands of hours infront of a computer, it makes sense to invest time in being "efficient".

You reach a point of diminishing returns with everything. You can only gain so much knowledge/intelligence/experience before every increase in that becomes extremely difficult. Trying to become "smarter" when you are already "smart" is much harder than getting easy efficiency wins.

There are people that take it to the extreme of course, where they spend all their time on extremely tiny efficiency wins instead of learning how to program, but that's the same problem in reverse.

It's a pretty old concept, the first time I've seen it given a proper name was "aggregation of marginal gains" [0].

[0] https://jamesclear.com/marginal-gains

troupo 6 days ago | parent [-]

> it makes sense to invest time in being "efficient".

It does. However, spending time remembering which of the different weird buffers something is pasted into is not being efficient.

0points 5 days ago | parent [-]

It's not "weird buffers".

It's a feature you're not accustomed to.

troupo 5 days ago | parent [-]

Yes. Yes they are weird buffers in that you have to spend some (minor) effort remembering what exactly is in the "clipboard", "selection", and the difference of invoking them between apps (e.g. having to Ctrl+Shift+V in the terminal).

Oh, and the fact that selection buffer gets overwritten if you switch between apps with active selections.

Oh, usually there's also a cherry on top in that everyone's darling, vim, doesn't even interact with any of those and has its own buffers aka registers.

I'm sure if there was a way to track how many time you make and undo mistakes in copy-pasting the wrong thing from the wrong buffer, your assumptions would be seriously challenged.

0points 4 days ago | parent [-]

> I'm sure if there was a way to track how many time you make and undo mistakes in copy-pasting the wrong thing from the wrong buffer, your assumptions would be seriously challenged.

> Oh, and the fact that selection buffer gets overwritten if you switch between apps with active selections.

What can I tell you...

Use a clipboard manager.

The end.

troupo 4 days ago | parent [-]

> Use a clipboard manager.

> The end.

Does it fix the issue with the multiple buffers and minor annoyances?

No. It just adds a different friction point.

The end.

0points 4 days ago | parent [-]

> Does it fix the issue with the multiple buffers and minor annoyances?

The stuff you mentioned so far is all about you not configuring your setup:

- buffers: You configure your clipboard manager to use a single buffer.

- vim: configure to use global clipboard if that's your preference

- X11: dont use legacy software

> No. It just adds a different friction point.

You think using software that implements functionality you deem missing "adds friction", and yet you still want said missing functionality and complain about it is missing.

That's wild.

franga2000 6 days ago | parent | prev | next [-]

What exactly does Toshy do for you? The readme is incomprehensible...

For the specific case of copy-paste in a terminal, you either have to press something extra for paste or something extra for SIGINT - there is no secret third option. You could remap copy (bad for muscle memory) or remap sigint (similarly bad for muscle memory, but also confusing since many terminal apps mention CTRL+C explicitly).

I guess a better place for copy/paste would be WIN+C/V, since it feels like a global function and not an app-specific one, but the way clipboard is implemented makes it an app shortcut by necessity. This convention also doesn't hold with things like ALT+TAB (switch windows) and CTRL+Q (close window), both of which feel like "system" shortcuts but don't use WIN.

So I guess my point is...keybinds are already a mess "because legacy" and any attempt at solving that mess would just result in less universality and worse muscle memory, which goes against their whole reason for existing.

In the grand scheme of things, "when in a terminal, press shift to escape key combos" is a very easy convention to get used to. Also work for mouse integration, for example if you have vim open and mouse integration enabled, but want to select and copy using the system clipboard.

lucideer 6 days ago | parent | next [-]

Toshy makes Cmd-C copy in all Linux apps: both GUIs & Terminals. This avoids any clashes with Ctrl in terminal as you're using Cmd for shortcuts everywhere instead.

> there is no secret third option

I assume you're thinking of trying to use Ctrl-C in terminals? The secret third option is never using Ctrl at all outside of terminals.

> I guess a better place for copy/paste would be WIN+C/V

Yeah that would likely be the equivalent of Cmd if you're using a Windows keyboard. That is how it's configured across all apps by default in macOS & Toshy just ports that sensibility over to Linux.

crtasm 6 days ago | parent [-]

Anyone know if Toshy is usable on xfce? It's not listed on https://github.com/RedBearAK/toshy?tab=readme-ov-file#curren...

lucideer 5 days ago | parent | next [-]

I haven't tried it but from your link it sounds like it is supported as XFCE uses X11.

The future Wayland support that the XFCE guys are working on uses wlroots so it should be easy for Toshy to support when it lands - there's a few wlroots DEs listed there.

dsr_ 5 days ago | parent | prev [-]

You can use XFCE's control panel / keyboard / application shortcuts to assign xvkb invoking XF86Copy and XF86Paste to whatever you like.

xvkb: the X virtual keyboard. In full GUI mode, it saves you when your keyboard is caput. In headless mode, you can synthesize keys not found in nature, or at least not on your physical board.

masfuerte 6 days ago | parent | prev [-]

In Windows Terminal CTRL+C is copy if there is a selection and interrupt otherwise. It's very natural.

Flockster 6 days ago | parent [-]

You can do this with many terminal emulators on linux too. I did it with konsole and tilix, just change the copy and paste shortcut and you get this "natural copy" behavior.

adastra22 6 days ago | parent | prev | next [-]

I use SIGINT more frequently in a terminal than copy-paste. I suspect this is also true of most power users. That’s why the situation is the way it is.

ItsHarper 3 days ago | parent | next [-]

Since Toshy is emulating Mac behavior, I imagine that copy/paste shortcuts move from the Ctrl key to the Super key.

lucideer 6 days ago | parent | prev [-]

I don't think you understand - macOS prioritises SIGINT use by introducing a new keyboard key for copy/paste instead of masking Ctrl. Using SIGINT more frequently is exactly the point.

jurip 6 days ago | parent | prev | next [-]

Also Emacs keybindings. Being able to use your text editor muscle memory for editing in every text field of every native app is fantastic.

Tor3 6 days ago | parent | next [-]

My muscle memory automatically uses Emacs keybindings for this, in editors like Pluma.. and the whole buffer is gone. Fortunately there's an "undo" option. But I really want Emacs keybindings to work everywhere. I have my various shells set that way.

koiueo 6 days ago | parent | prev [-]

> every native app

That's a very big fineprint. With three most popular apps among developers being (I imagine) browser, jetbrains ides and vs code derivatives, all being non-native, muscle memory becomes pretty unreliable.

But yeah, would be big, if it indeed was universally supported

miohtama 6 days ago | parent | prev | next [-]

> Which I would've really expected more Linux users would value more than they seem to.

It's likely that the users who find this annoying will simply stop using Linux.

bigstrat2003 6 days ago | parent [-]

I find it annoying, it just.. is what it is, you know? Not like other OS choices don't come with their own annoyances, so I have to choose whichever warts I can live with. Right now, that's Linux.

0points 5 days ago | parent | prev [-]

> Which I would've really expected more Linux users would value more than they seem to.

We use copy on select... what's all of this keyboard shenanigans /s