While writing & editing code, and only while doing that, I have a tic that looks insane to onlookers. The last comment I received was “Why the hell are you tapping the caps-lock key non-stop?”
I don’t know why I do it. It helps me think, though. Maybe any of the keys on the keyboard would satisfy my cravings to tap a key repeatedly, but I unconsciously chose capslock because it’s mostly benign to press. Perhaps it’s the toggling of the capslock state that tickles my neurons? I don’t know!
Similarly, I felt very strongly about the contents of my clipboard while doing any input on a real keyboard , until I discovered IntelliJ’s clipboard history feature (Ctrl+Shift+V) and more broadly Window’s terrible but sufficiently functional version (Win+V).
The emotions I felt about clipboard contents were intense. I had to have something small, succinct, and simple in my clipboard like a single word, so that I could spam Ctrl+V and Ctrl+Z constantly without consequence, just like my capslock tic.
I do wonder if my fidgeting helped me learn editor shortcuts, because while I’m never quick enough to meet my own editing-speed goals, my editor fu earned me the title of “Text Wizard” at one company. It’s fun blowing peoples’ minds by smoothly executing a column-based edit on thousands of lines of data, saving them potentially hours of manual editing.
Aside: A coworker once called a one-line regex a “dark incantation,” and a forty-line regex I wrote on someone else’s’ PC earned the title of “Cthulhu’s Lullaby.” Good text editing skills is a superpower in our age (for many but obviously not all occupations).
The tapping is from anxiety. You’re defaulting to a common action. Some people chew their finger nails, some use a fidget spinner. If you want to stop, identify when you’re doing the habit and catch and control yourself, relax, and identify the anxiety.
I read once some intelligent people still have some process cycles left when working out code and it's uneasing to them so their brains automatically adds another soothing activities to fill the void. For one of my coworker it was either whistling, feet tapping or pen clicking. To the point that another coworker regularly stand up from his chair, walked to him and put a spongy stress ball in his hands. Without saying a word, was funny the first time :D.
At which point did I indicate there was a mental health problem? Everyone has anxiety and it manifests in different forms and eventually can be habitual.
I just fidget. A lot. I have to concentrate to sit still (meetings are torture). When I'm thinking about a problem, my mental budget is redirected to problem solving, so my fidget inhibiting stops.
Drives a lot of people nuts. Whatever. Go sit somewhere else. I'm sitting over here, away from everyone, minding my own business. I didn't ask you to sit near me.
Everyone's different. Some people hum. Some people "talk aloud" (my kryptonite). Some people do zen flow state. I like to dance, so I put in the ear buds and jam.
As someone who used to work with spreadsheets extensively at a bank, I can tell you that some kind of stack/queue functionality would be a godsend.
For instance, in this mode you hit Ctrl+C five times, then the subsequent five Ctrl+V actions paste the data in FIFO order. It may not seem like much, but going in between app windows in order to grab data is a big time sink. Being able to copy items sequentially and then paste them sequentially would be a killer app in most Excel heavy office workflows. You could also add a toggle for LIFO, or maybe some keyboard shortcut / chording for toggling modes while the user is pasting.
I had actually tried to implement this as a hobby project but truthfully, my MVP was rudimentary at best because I’m inexperienced at COM+ and developing for the Windows Shell.
Edit: I’m using ‘Stack/Queue’ loosely, not in the rigid data structure term of art way.
Thanks for sharing! As I understood, I think many clipboard managers already allow this, or at least, CopyQ and Ditto do. The approach is to just copy all the items you need, and then press "Win+V 5" five times. 5 would paste the fifth item in the history, but every time you did that, it is pulled to the top of the list, putting the next item in that spot.
Thank you for sharing as well, I’ll have to give those two programs a try because they seem to be doing what I was hoping for. Best of luck on your project!
One clipboard feature/mode I’d like to have is "append to current clipboard content" (for text). I.e. like `>>` vs. `>` in the shell. Not multiple clipboard entries, just a single one that is textually appended to.
While there definitely are good use cases where rich text clipboard should be supported, for me personally a major use case requires eliminating rich text - where I'm frequently pasting some data from some web system into e.g. a word document and I want to explicitly paste just the text, because it really does not matter what styling the web page used for some ID. Word's "Paste Special"->"Unformatted text" is horribly inconvenient, so currently I just paste it in my text editor and re-copy it, ensuring that only the text remains in the clipboard.
I have always wanted a "clipboard firewall", such that apps on List A can never copy and paste between apps on List B. Basically two separate clipboards.
If I want to move things between them, I should open the clipboard manager and manually move an individual item, or bridge the two clipboards for a specified time, after which they go back to being isolated.
I wonder if it could be done with AutoHotKey. Perhaps having a global script variable for each List. AutoHotKey already supports interacting with the clipboard and targeting different Apps/Windows based on a number of criteria (class, title, exe, pid). So when you hit Ctrl+c or Ctrl+v you would hit logic to direct the clipboard contents to one of your list variables, then when you hit Ctrl+v it would do a similar check. You could even map a different key for a "global" clipboard (e.g. Ctrl+Shift+v or the rightCtrl+v).
All of my AutoHotKey triggers are off of the right control since I noticed a long time ago that I never use it regularly. In the old days (~2004) I would use it to write HTML. Hitting right Control+a for example would surround the text with an <a> and have logic for @ or http: etc - or hitting right Control+l would surround a list of items with <ol><li>. These days I have very few macros, the most useful one being code that will "type" what's on my clipboard rather than paste it which is useful for places that don't allow pasting.
From a security perspective, I don't think it's possible to do with the standard OS APIs.
When an application makes data available in the clipboard, it's a free-for-all for every other application. The clipboard manager would have to race other applications to make a copy of the data, and then empty the OS clipboard.
APIs also may not allow making decisions based on which application requested the clipboard. It's possible to do in X11, but not Windows.
This goal could be achievable by intercepting the OS clipboard API. On X11, this can be done by MITM-ing the connection to the X server - https://github.com/CyberShadow/hax11 does this, and already has one clipboard-related security feature (disabling the selection mechanism). On Windows, the best bet is probably global DLL injection and API hooks, but applications can "opt out" by running as a different user or requesting a higher integrity level.
It swaps the current selection with the contents of the clipboard (replacing the clipboard with the selection, replacing the section with the prior contents of the clipboard — a swap).
It's a nerdy ask, if anything adds more complexity to the clipboard concept. But I have found myself having a need for this shortcut often.
In vim that's what happens if you select some text, then paste. Honestly I sometimes want to turn this off, as I want to paste the same thing multiple times, and I resort to putting the fragment to paste into a named register.
The clipboard manager I used on Windows, which only works there and hasn't been supported for a while, allowed a "Win+V, type, enter" workflow to very easily search for whatever I "type"d as a substring, and paste that entry. No interacting with menus, no up/down presses, no mouse. I miss that feature.
I hope you're going to build only a sync plugin like suggested and not a whole clipboard manager.
Nobody needs yet another clipboard manager as there is almost a perfect one out there. Which can be extended by plugins! (I don't think it's a valid approach to start a new project because some project doing most of the wanted stuff isn't "perfect". The result is almost always "yet another 80% solution").
The "limited" number of entries is not an issue, imho. You can set it to x-thousand entries if you like. (One thousand entries are enough for more than two weeks of history for me. A clipboard is not a means of permanent data storage at all so this is fine; even one can have something akin to permanent entries by just using tabs in CopyQ).
Implementing in CopyQ some of the suggestions mentioned here would be great though!
I don't think a sync plugin would work. Entire parts of CopyQ's architecture would need to be redesigned, which would affect the rest of its ecosystem.
You can read the issue I filed in CopyQ's repository back when I switched to Linux and had to stop using Ditto for the justifications of infinite history:
https://github.com/hluk/CopyQ/issues/510
CopyQ is also bound to use Qt's clipboard implementation, which provides the common subset of Qt's supported platforms, with all the consequent limitations. See the other issues I filed for details.
To all of you who stopped worrying thanks to a clipboard manager, how do you handle sensitive contents in your clipboard?
For example, I routinely copy-paste my passwords from KeePass, and I have disabled all clipboard management to avoid copies of my passwords lingering around.
I see this happening also with the default clipboard manager in windows and 1password - copied passwords do not show up in the clipboard menu (downside they are not pastable in VMs either)
> default clipboard manager in windows and 1password - copied passwords do not show up in the clipboard menu
Mmm, Windows Clipboard does saves the password that I copied from Keepass, they will be in the menu. However Keepass have a option to clear the last entry in the clipboard which is set for 10 second to let the password persist in the clipboard and then Keepass will overwrite/remove the last entry after the time is up. Very useful imo.
Good point, wondering the same thing. I'm considering starting using a password manager, but my bigest concern is that malware can capture the passwords by listening to clipboard. The model in my head on Windows from programming using WIN32 API two decades ago is that any application can read clipboard contents as often as it wants to. Assuming the malware does that in a tight loop, how can password managers be secure at all? I imagine X Window System is no better in this respect. Has anyone given this any thought? Are my concerns unfounded?
Your concerns aren't unfounded, but they're a bit misplaced. Password managers aren't intended to protect you from a local attacker, on your machine, like the malware you described. It is trivial to capture clipboard contents, as you say, but it's also similarly easy to keylog so your passwords would be exposed either way. If you consider your computer compromised or antagonistic like this, don't use it for anything sensitive.
Password managers are mostly intended to help facilitate unique passwords per account, to avoid password re-use which prevents credential stuffing. That is, if an attacker gets a hold of your password from one website they can't use it to log in everywhere.
Back to your concern, there isn't a solution for Windows in this space at the moment. Malware that's alive in your user context (or Satya forbid, SYSTEM) can do quite a bit thanks to Win32 APIs.
I solved this problem by using Qubes OS, with isolated VMs for everything and inter-VM secure text copy. The passwords are stored in plain text in an offline VM, no password manager is necessary (but you still can use it if you like).
This is still a concern. I do malware analysis for a living and most windows malware these days that steal clipboard data simply hook the windows APIs and grab a copy of everything in there.
Thanks. What would be your recommendation regarding password managers? Does using a password manager's browser extension (assuming it has one) help here or does that also use clipboard? I guess I'm damned either way because I'm gradually migrating to using generated passwords which I copy via clipboard anyway.
If I'm not wrong you can configure KeepassXC to only store credentials in the clipboard for a selected timespan (like 5, 10 or 30sec). You can also eliminate it entirely IIRC by using the autotype feature when entering credentials.
You can, but AFAIK the way it does that is by overwriting the clipboard with null data. If you have a clipboard manager, it may save your credentials before it is overwritten so that it can retrieved later, and in this case, it is not something you want. Some clipboard managers can be clever and detect a null overwrite and interpret it as a request not to save the overwritten content.
Autotype do not suffer this problem and is generally considered safer. Some password managers have an even safer "mixed" mode where part of the password is in the clipboard and another part is auto-typed, meaning you have to monitor both the keyboard and the clipboard to grab the password
At least one possible fix would be a clipboard management standard such that an application can both set and clear or overwrite a specific clibpoard entry's data.
(I'd prefer the clear/overwrite myself.)
Another option would be specific IPC such that clipped content is available to one and only one other application or process. There was a recent HN submission on the Unix password manager utility "pass", including the ability to supply passwords to a command via shell expansion rather than as a command-line parameter. The former doesn't reveal the password in either process listings or shell history, the latter does.
That's a relatively primitive option, a more robust standard might also be provided.
I'm using Raycast on macOS. When I copy a password using 1Password, the copied text does not end up in Raycast's clipboard history. It might be possible that other password and clipboard managers do the same.
Try it. I was initially worried about this. Turns out with KeePassXC and Klipper it Just Works™ and fields copied (via keyboard shortcut) somehow don't get stored in the clipboard history at all.
Yes, KeePassXC actually has a little UI element in the lower right of the window that shows when it will clear a copied password out of the clipboard history.
Blacklisting BitWarden in the clipboard manager. If I copied from another app, it's four extra keystrokes to paste and delete: Cmd+V -> Cmd+Shift+V -> Cmd+Delete -> Esc.
I try and copy the password only so that on the very odd chance someone combs through my clipboard history they still wouldn’t know what site or username it matches. I tend to use unique/generated usernames or emails as much as I can so that I’m not “1337wiz” on every website I have an account on.
I seem to have drifted to the exact opposite: no clipboard manager, and when I want to cut/copy something and have it persist for longer, I just paste it in a notepad application.
I copy/paste passwords much more often than I require multiple clipboard entries alive together.
At least one keepass implementation has the option to clear the clipboard after a few seconds. Haven't been at my Windows PC for months, can't remember details. No idea how that would work with clipboard managers, though.
I stopped worrying about it when I installed the Ditto clipboard Manager[0]. It keeps everything, so don't have to keep track of what I copied in my short term memory. I offloaded that task to the computer. Turns out they're good at that kind of thing.
It’s such an unassuming piece of software but it might be the most important executable on my laptop. It’s basically an instant notebook. Find anything remotely interesting? Just CTRL-C it and it’s there whenever I need it.
Ditto is really good. I've been using it for a long time too.
Not only does it store a bunch of things but it's really easy to search through existing clips, especially text.
It's also:
- Extremely efficient from a runtime perspective, it uses ~2mb of memory
- Loads nearly instantly when you invoke it
- Very easy to paste something without formatting (surprisingly useful)
- Open source
It's in the same category of greatness as IrfanView and foobar2000 for Windows apps that I'll likely use until the end of time.
The Windows clipboard manager doesn't support search. Ditto does. As soon as you open it you can just type a subset of some thing you recall copying the other day and it will immediately filter to that entry (or those entries). Biggest reason.
Ditto also rearranges the items so the last pasted is at the top rather than the last copied. This is also helpful because if I'm pasting something regularly, it's nice for it to be at or near the top.
You can configure how much history you want Ditto to store, by days or number of entries.
The Ditto clipboard entries are not as visually bulky as the Windows clipboard history entries.
The Ditto window can be resized, the Windows clipboard manager cannot be.
Those are the main reasons for me. Ditto also has a bunch of more advanced features but I've never used them.
I use ditto too and set it so it has everyting I copied in the last 2 weeks. It's really nice to be able to instantly retrieve some text which I copied 4 days ago, for example.
I have a tangentially related issue. It's completely irrational, but I can't shake it. Sometimes when writing code, I need to add a block that looks a lot like an existing one, so I'll copy it and paste just below. (Yes, I know, DRY. Sue me :)
The irrational part comes in when it's time for me to make the tweaks. Maybe I'm working on a yaml config file, and I need to specify two objects that are mostly the same, with minor changes to one of them.
I'll make sure I'm working on "the copy", and not "the original". So, let's say I start with this:
- author: E. Hemingway
title: The Old Man and the Sea
medium: hardcover
edition: 1
published: 1952
And the project manager says I need to add the second edition paperback to the list. I'll find that block, copy the whole thing, and *then make sure I don't disturb the "original":
- author: E. Hemingway
title: The Old Man and the Sea
medium: hardcover
edition: 1
published: 1952
- author: E. Hemingway
title: The Old Man and the Sea
medium: trade
edition: 2
published: 1953
Basically, I've internalized that my bits have a color[1].
It makes some sense. You don't want to accidentally make some of your edits on one version and some of them on the other version. That would mean that you end up with wrong data, and also have to slowly unwind your changes correctly, if you want to get back the original.
So you have to arbitrarily choose one and keep in your mind that that's the one to be edited. You could choose the 'bottom' one. But because object persistence is pervasive, you choose the 'new' one.
The irrationality comes from the fact that I end up with exactly the same text file no matter what. My edit path (directed graph of atomic edits that arrive at the new file) can go many ways to the same result, but I find myself hating one path, and liking another. Even in the "good" path results in more keystrokes during editing. When I save my changes to git or svn or whatever, the new file will be the same regardless of edit path taken to create it. But during the editing operations, I had a nagging pull to make sure the characters I changed were from the copy.
A) why is this irrational, and if so, why is irrational sub-optimal given that the issue involves a non-(fully)-rational system (you)?
B) The habit seems very effective, why would you want to 'shake' a very efficient process?
C) DRY is an end-state which makes sense for (some) code. It is not at all clear that it makes sense for i.e. yaml config files, where it is expected that numerous items may have many similarities.
Sounds to me that by internalizing that bits are colored you have improved your engineering skills.
A, B) I'm not sure I did a good job illustrating with my example. But there are times when the new text needs to appear above the text I copied. In that case, I'll take extra effort to paste the section to edit above the existing, to make sure I'm editing the "new" text. Even if it takes a bit more effort to position my cursor above the copied text.
So in vim, I might yank an entire line and paste it immediately ("yyp"). This automatically pastes below the yanked line and positions the cursor on the new line. But let's say I want to make the edit above the existing. This situation is wrong. The new line was just pasted below the existing. Even though I'm looking at a pair of perfectly identical lines in the file, and could make my edit wherever I choose, I have this idea that one of those lines is the original and the other is the copy. And I don't want to edit the original. In other words, whether I "do it wrong" or "do it right", the end result will be bit-for-bit identical. But one of those edit paths bothers me and the other one doesn't.
So in the yanking and pasting process, I'll take the extra time to move my cursor above the copied line, then paste it in so as to preserve the "lineage" of the text.
This has nothing to do with version control or any other actual efficiencies. It's just my brain being weird. I don't gain any actual benefit, just a calm mind :)
C) Yeah, I was just heading off any nitpicks about my comment.
I have a custom keybinding (super key + c) that will bring up the Rofi menu to fuzzy search through previously copied items or pinned items. Super handy when writing code, finding old snippets, etc.
I think it's because when you copy something to clipboard you are also putting a note in your short term memory about it. Our short term memory isn't very good, with only a few slots for storage. A way around this could be for a mini-image of the contents of the clipboard to be displayed in a corner of the screen somewhere.
For me, the two things don't go to the same register, but for you, you can select the old URL and paste over it (vWp) instead of deleting and then pasting (dvWP).
I got really annoyed by this, so made it so dd just deletes rather than adding to clipboard. If I really want to "cut" I highlight in visual select mode and press x.
Having the common deletion operation also default to adding to clipboard is a design mistake in Vim, I feel.
dd deletes the line under the cursor. "dd deletes something into the d register (the " is part of the command that selects the register). "d selects the register. The second d is the delete command. So you could do something like "dd2w to delete the next two words and save them into the d register. The same thing works with any named register, so a less confusing example might have been "cd2w to delete into the c register.
It's rare to find people reifying these subtle subjective aspects of UI design so clearly. Transience is a deep problem in UI design. Everything from accidentally kicking out the cord and losing your (unsaved) work, to accidentally copying a selection and clobbering the previous contents of the clipboard (that you still also want to paste again too.) Modal dialogs, modes in general, un-undoable changes of all kinds. It's kind of like our UIs are video games in the sense that they are harder to use than they should be. Video games have to have some sort of challenge or they get boring, eh?
I mostly freed myself from that weight with a clipboard manager. LaunchBar[0] on macOS and CopyQ[1] everywhere else. It’s nice to know I can Cut1/Cut2/Cut3, then Paste2/Paste1/Paste3 to my heart’s content with no worries of overwriting the contents of the clipboard forever.
It’s one capability I sometimes miss on my i(Pad)OS devices.
I'm happy someone has vocalized this same nagging feeling I have had for all these years. I just wish it had been addressed instead in the form of haiku. Maybe someone can try.
The other thing that has bothered me all these years:
Jef Raskin in The Humane Interface complained about that very problem.
He designed a whole user interaction paradigm to solve it, so that the system would always be in a state where your typed text would be registered, right there.
It goes well with the aphorism and commandment that "user input is sacred", which all current user interfaces disregard big time.
I cannot relate to the article. If I cut files and do nothing - they are not deleted from the origin. If I cut text - texts are versioned and backed up with git or similar alternative.
Even if I would lose something, it wouldn't take too much time to restore it. If its a password - 99% of them can be recovered
I've overwritten my clipboard multiple times by accident, so I think that weight is the fear of losing what I copied. To be honest, the clipboard bears the weight of so much productivity, even though by default, its functionality is pretty limited. It's the poor man's IPC, after all.
You could use a clipboard manager to get rid of that weight. KDE comes with Klipper, which remembers the last N things you copied, and makes this N configurable (I do increase the default). It also provide a lot of nice features too, like search in the history, make the copied text into a QR Code or invoke an action on the copied text, make a preview entry the current one.
Not to me, because in the software I use the thing gets actually deleted once I paste it somewhere else, not before. It's more like tagging the thing(s) for moving to a location to be disclosed later.
It could get deleted in other ways (for instance YouTube has this horrible habit of deleting your comment in progress when you finish watching a video).
I always use cut (+ immediately paste back if needed) rather than copy because it gives me the visual confirmation that the object has indeed been put in the buffer.
Under X, the clipboard is especially heavy: you have two ways to copy and paste (Ctrl+c/v versus selection and middle mouse button), and Ctrl+v doesn't work in terminals. It's confusing.
Interesting, I never looked into clipboard managers.
I often have to copy X and Y coordinates from two fields to the same fields in another instance of the application. Is there an easy way to copy both values and only then switch to the other instance and paste them?
In Excel? Click on field X, press and hold ctrl and click on field Y to mark both fields, then just copy&paste should work.
Otherwise this is up to the app. A generic clipboard has no concept of the content of X and Y being in different fields (because it has no clue what a "field" is). It just stores the content.
Can you say a bit more about how it compares to other clipboard apps?
From a quick look over the website I see no feature to prefer it over included standard clipboard managers like klipper, glipper, parcellite,... (or any from https://wiki.archlinux.org/title/Clipboard#Managers) and whatever win+V on windows is called.
I have exactly this feeling and still paste somewhere or copy garbage to get rid of it though for macOS i use yippy as clipboard manager and it improved the feeling of being in control a lot.
similar ticks exist for undo history and saving as well as browser navigation. I wonder if this is something normal people experience or if it is connected to my strong adhd.
I developed a bad habit of not wanting anything in my clipboard after I've used it, so I usually copy the letter `e` (or something similarly unimportant). It's almost like an OCD at this point (in the browser, CTRL + L, 'e', backspace, CTRL + A, CTRL + C, esc). One of my new-year's resolutions is literally to stop doing this silliness.
Does anyone have a solution to sync clipboards across:
1. The system (XServer)
2. A terminal text editor (Kakoune)
3. The same text editor on another system over ssh
I currently have 1 & 2 sync'd ok, but 3 is only one-way. I use the OSC 52 escape sequence (supported by my terminal) to sync a copy on 3 to 1. But I have not figured out how to sync from 1 to 3.
I might be misunderstanding you. I have a setup such that:
When I yank to the "kakoune clipboard buffer" in kakoune (a terminal text editor), the X clipboard is updated (again through OSC 52). When I copy something to the X clipboard (either on chrome or some other program), the "kakoune clipboard buffer" is updated [0].
[0]: technically, the kakoune clipboard buffer updates itself from the X clipboard when it is read from.
like all external brains, the clipboard forces you to confront 'thinking without knowing', which can be dissonant and slow, and requires browse and search strategies rather than leaping to conclusions.
Indeed, it is the weight of having something interrupted or unfinished. Putting it in a clipboard manager feels like the task is no longer weighing on your working memory, and it completes the first part by reaching a checkpoint.
I don’t know why I do it. It helps me think, though. Maybe any of the keys on the keyboard would satisfy my cravings to tap a key repeatedly, but I unconsciously chose capslock because it’s mostly benign to press. Perhaps it’s the toggling of the capslock state that tickles my neurons? I don’t know!
Similarly, I felt very strongly about the contents of my clipboard while doing any input on a real keyboard , until I discovered IntelliJ’s clipboard history feature (Ctrl+Shift+V) and more broadly Window’s terrible but sufficiently functional version (Win+V). The emotions I felt about clipboard contents were intense. I had to have something small, succinct, and simple in my clipboard like a single word, so that I could spam Ctrl+V and Ctrl+Z constantly without consequence, just like my capslock tic.
I do wonder if my fidgeting helped me learn editor shortcuts, because while I’m never quick enough to meet my own editing-speed goals, my editor fu earned me the title of “Text Wizard” at one company. It’s fun blowing peoples’ minds by smoothly executing a column-based edit on thousands of lines of data, saving them potentially hours of manual editing.
Aside: A coworker once called a one-line regex a “dark incantation,” and a forty-line regex I wrote on someone else’s’ PC earned the title of “Cthulhu’s Lullaby.” Good text editing skills is a superpower in our age (for many but obviously not all occupations).