3 ms·
Is the issue specific to terminal or are you seeing it somewhere else? The issue is that the default terminal behavior of ctrl+c sends a SIGINT to the running
by enobrev 11y ago
Is the issue specific to terminal or are you seeing it somewhere else?
The issue is that the default terminal behavior of ctrl+c sends a SIGINT to the running application[1], and so terminal programs override it with shift+ctrl+c, and likely add the shift for the others for consistency.
I use "Terminator" as my terminal app - which allows you to set your keybindings - so I replace the "shift" in copy / paste and it's worked great for me for years. Unfortunately it doesn't allow you to override the SIG* keys, so it can be an issue when using `watch`, which removes your selection when it updates and then if you don't tap ctrl+x in time, it will send SIGINT the watch command, which is the exact opposite if what you want at that moment.
As for VIM, being sure you're in insert mode is essential no matter what OS you're using.
Is there anywhere else besides the terminal where copy / paste are inconsistent? I haven't seen any that I recall in quite a few years of Ubuntu on my desktop, laptop, media PCs, etc.
1: https://en.wikipedia.org/wiki/Control-C https://en.wikipedia.org/wiki/Control-C
- sandGorgon 11y agono please - I'm not talking about ctrl-C. I'm talking about CUA - https://en.wikipedia.org/wiki/IBM_Common_User_Access https://en.wikipedia.org/wiki/IBM_Common_User_Access Even on OSX, the bindings that are used are cmd-c and cmd-v. It is universal - if you have never used the terminal, vim and firefox on a mac... I really urge you to do that. you'll see what i mean.
- enobrev 11y agoI see, thank you for clarifying. Having used all versions of Windows up until 8[1] and 8+ years of ubuntu, I'm surprised I never realized this standard existed. It makes perfect sense that it does - I just didn't know it. I agree that it's unfortunate it's not as well supported on Linux as it should be. Coming from the other side of things, I had a lot of trouble when I was lent a brand new Macbook Pro for travel during my last job. It seemed some things worked using cmd and others using ctrl. I don't remember the specifics, as I didn't use it often enough, except that I'd find myself mashing keys on occasion trying to figure out the right combination. It was far worse when I dual booted with ubuntu. The keys made no sense to me there either. Finally, I replaced OSX completely and the keys were "normal" again (ctrl+* for everything). 1: Also lots of DOS, but I don't even remember what versions. I had managed lots of desktops and servers running DOS for a few years in IT a couple lifetimes ago.
- eschaton 11y agoYou've got the causality reversed. The Apple Lisa introduced the command-Z/X/C/V keyboard equivalents for undo/cut/copy/paste, and they were kept with the Macintosh and Apple IIgs. IBM CUA and Microsoft Windows adopted them afterwards, adapted to the PC keyboard; I think Windows only adopted them with Windows 95 and NT4.
- pjmlp 11y agoNo, they were already there in Windows 3.x
- tatterdemalion 11y ago> Unfortunately it doesn't allow you to override the SIG* keys You should be able to set these with `stty` (they're not actually a function of the terminal but of the tty, a detail no one should have to know).