Live data from Hacker News

Don't touch my clipboard

alexanderell.is

101–110 of 322 posts

Re: Don't touch my clipboard

#101
I can read & write a language that I don't have a keyboard for (I use a standard US 101 key layout), so I work around this by cut & pasting single characters around to fix up the missing accent characters. Usually even a partially fixed word is enough for the spell checker to kick in and correct the rest, making this surprisingly fast.

The thing that annoyed me recently is that if I cut & paste a single character in Google Mail, it'll "helpfully" surround it with spaces when pasted. Other applications like Firefox or MS Word don't have this behaviour.

I just tested it, and the GMail behaviour is wonderfully inconsistent:

Copying from GMail to to plain text (e.g.: a text editor) will result in a single character.

Copying from plain text into GMail will result in no superfluous spaces.

Copying from GMail to GMail or to any "rich text" editor will add the extra spaces.

So basically I'm copying plain-text, but GMail is abusing rich-text formatting to add "magic" behaviour someone at Google assumed is beneficial, but is just confusing and arbitrary.

PS: Similarly, GMail's spell checker now "fights" with the Firefox spellchecker and the result is that neither wins and obvious typos aren't resolved unless I turn checking off and back on a couple of times.

Re: Don't touch my clipboard

#102
post #62

Earlier quoted context omitted.

as does the kindle app. it's come in handy once for me (in a comment to a hn post, ironically), but usually it's a nuisance.

I loved it when I used Windows and OneNote (it would add metadata when I pasted to OneNote but not otherwise.)

I think the windows clipboard can hold that as metadata. OneNote had a setting that I could enable so that when I pasted from Edge into OneNote the url was appended, but the url wouldn't show up if I pasted into another rich text editor like Word (or OneNote without the setting enabled).

Using org mode now, and there's probably a way to do it with emacs lisp, but... I'll never get around to it.

Re: Don't touch my clipboard

#104
post #76

Earlier quoted context omitted.

> I can't think of a single time when I want a site to react to my attempt to copy text off if it. I think it is needed for some complex web app to handle copying non-text content. Such as images in wysiwyg editor, Google Sheets/Slides...

So trade those apps not working for immunity from JavaScript clipboard hijacking? I'd be 110% fine with that trade and nothing of value to me would be lost. Is it possible in Firefox? Anyone know?

Millions of people use applications with these kinds of features. A few more examples: the Scratch educational programming tool, website builders such as Webflow, diagram editors, image editors, etc. The list goes on and on.

The browser is no longer just a document viewer... That ship has sailed, and overall it is a good thing.

We can mitigate the risk of clipboard hijacking without burning down the house. By the way, I would guess that this is a minor risk in the grand scheme of things, as it seems that the worst risks are for technical individuals people copying programmatic commands (e.g. software engineers). For others, it is a real yet minor annoyance.

Perhaps there could be an opt-in setting for allowing a site to modify the default content that is copied from a selection?

Re: Don't touch my clipboard

#105
post #67

Earlier quoted context omitted.

My instinct is that this is for legal attribution purposes, i.e. a legal moat. It sounds ridiculous, but in my experience, there are 1000 things that lawyers will identify as possible sources for legal trolling and this looks like that. Apple has a zillion dollars in the bank and they are sued daily. All it takes is for a judge who may nor not be knowledgable or a sufficiently grey area ... and you have a major probl…

Unlikely - see my comment elsewhere in this post.

So yes, I see in your comment that given the context of 'Apple Books' it's probably a contractual issue, I agree there.

Though I can see that a reasonable legal opinion might not support my more cynical view, when the risk dynamics are high, a different kind of logic creeps in.

I worked for a software platform that refused to provide usable snippets of code anywhere in the documentation for fear of liability.

We also 'perpetually sued' an organization that was infringing on our brand, even though they were really helpful to us (a user-managed fan-site which used our name in theirs) and otherwise had a positive relationship with them. Our 'perpetual legal action' was merely cover give the appearance that our brand was being defended, without which action, we could feasibly lose rights to it. So, literally suing people, while dragging out and 'nudge-nudge-winking them' to not worry about it, literally inviting the people we were suing to events, dinners etc..

I don't think most people understand the risk dynamic in many large organizations with respect to these issues, the calculation seems bizarre even to most regular product types, it really takes a legal view to understand this. And also the personal fears and biases of the executives.

Re: Don't touch my clipboard

#106
post #99

Earlier quoted context omitted.

Ok but those are standard, valid characters like any others. Why are they ‘horrid’?

Because for some reason terminals are stuck in the 70ies and don't accept those characters as quotes. Anything but ASCII trips them up. Seems such an obvious interface to innovate, but it seems to run into terminal wizards sense of purity.

The problem, such as it is, is with languages. Terminals (mine at least) handle most of Unicode just fine; admittedly I've seen it choke on emoji, but punctuation, nah.

The vast majority of programming languages are defined in terms of ASCII and only ASCII. I don't care for this, personally.

I've given some thought to how to do quoting right in a programming language, and implemented «guillemets» as an experiment. But it's challenging, you need to decide what to do with all of “”‟„"″ and there aren't obvious pairings, like „this is a sentence” and “this is a sentence” and »this is a sentence» and «this is a sentence» and »this is a sentence«, it ends up feeling like rather a lot of effort for what you get in return.

Oh, one of those characters I typed isn't a quotation mark, did you catch which one? Hacker news won't even let me type two of them!

Re: Don't touch my clipboard

#107

I can read & write a language that I don't have a keyboard for (I use a standard US 101 key layout), so I work around this by cut & pasting single characters around to fix up the missing accent characters. Usually even a partially fixed word is enough for the spell checker to kick in and correct the rest, making this surprisingly fast. The thing that annoyed me recently is that if I cut & paste a single character in…

My bet is that there simply is no standard for anyone to adhere to at Google. It's a rather granular and specific artifact of UI, in a company not necessarily known for it's UI prowess or consistency, at least along that vector.

I'm wondering if some of these issues could be resolved with some solid industry standards.

Re: Don't touch my clipboard

#108

Earlier quoted context omitted.

Because they result in a syntax error.

But they wouldn’t do what you wanted anyway if they were ASCII. What’s the problem specifically with them being Unicode?

The problem specifically is that they are not the ASCII quote character. There is only one ASCII quote character, and that's the one used by programming languages. Any other quote or quote-like character is outside the ASCII range, and must therefore be Unicode (or another non-ASCII code page).

Re: Don't touch my clipboard

#109
post #12

Earlier quoted context omitted.

> disable dark patterns like these Clipboard access isn't guaranteed to be a dark pattern, though. It's an API that the browser supports. I dislike clipboard access 99% of the time, but it's actually useful in a few UIs (like copying keys in AWS). Should it really be up to the browser to determine that an API is always a dark pattern? Honestly, most of the worst dark patterns of the web are enabled by regular , , and…

Is it really useful in AWS? Why is it needed?

In certain situations, you have to copy and paste a bunch of settings over and over again. It saves you a few clicks and keyboard taps each time.

Re: Don't touch my clipboard

#110
post #68

Earlier quoted context omitted.

MS Word will autocorrect two hyphens into either an en dash or an em dash based on what it believes you were trying to type. So this: "em--dash" becomes this: "em—dash" while this: "en -- dash" becomes this: "en – dash"

En dashes are for ranges and sometimes for compound modifiers, like "billiard-ball–size hail" or "New York City–based attorney." Not sure who advised MS Word to turn two dashes into an en dash, ever, but it's not correct. Whether an em dash has spaces around it is a matter of style.

MS has never worried about correctness :)
Post reply on HN