How does the operating system decide what gets selected on double click?

1

When you double click text, the word under your cursor gets selected. How does the operating system decide what gets selected? It stops at whitespace characters, and certain symbols, for example, when you click 'pan' in pan|cake, only pan is getting selected. But not all symbols act as separators, for example, double clicking pan_cake will select the entire thing. And, there are differences between applications, for example, in chrome pan.cake will be seen as two separate words, but double clicking pan.cake in textEdit on the mac will select the entire thing. How is this decision made?

bigblind

Posted 2013-12-10T23:04:39.230

Reputation: 233

Question was closed 2013-12-11T05:21:23.483

2Why the off-topic–close-vote? ಠ_ఠ – Synetech – 2013-12-11T01:47:35.467

Answers

1

Each operating system and possibly application will have it's own user interface/user experience guidelines that define how this works.

K.A.Monica

Posted 2013-12-10T23:04:39.230

Reputation: 5 887

Try triple-clicking for instance... – Doktoro Reichard – 2013-12-11T00:14:26.813

On the mac, that always selects the entire line AFAIK. – bigblind – 2013-12-11T04:12:14.020

0

Every application, including operating systems, have an event handler called (at least in the Windows world) OnClick. Its up to the application application developer, not the OS, to decide what to do when a user clicks on text. Not every single, double, right, left, middle, etc click does the same thing across applications.

A good example of this would be the Chrome browser. Most editable text in applications will place the cursor where you clicked on the string. However, in Chrome, they changed this action to select all the text. This makes sense, as most often people want to change the entire address.

Keltari

Posted 2013-12-10T23:04:39.230

Reputation: 57 019

However, in Chrome, they changed this This is to be expected because the Google thinks it always knows better than everybody else in all circumstances, no exceptions (even whenver they happen to be proven wrong). ಠ_ಠ – Synetech – 2013-12-11T01:45:31.210