On Mon, Mar 01, 2010 at 01:16:42PM +0000, Steve Fosdick wrote:
On Sun, 28 Feb 2010 12:06:44 +0000 Chris G cl@isbd.net wrote:
I am *forever* getting text inserted at the wrong place because it's inserted at the mouse cursor rather than the text cursor. This happens particularly in web textareas but the problem is common to most/all GUI applications I think. (I just tried in OpenOffice and it's the same there).
Surely by default one would expect text to be inserted at the *text* cursor, not where you've moved the mouse cursor to which is often out of the way to avoid it obscuring what you're typing.
My editor (xvile) manages to do it right, it's a GUI application but text inserts where I'm typing.
Is there a setting somewhere to say "insert text at the text cursor"?
Chris,
Which GUI environment are you having the problem with, i.e. GNOME, KDE Xfce etc?
My experience using GNOME is that for most applications that have some kind of text entry widget, clicking in that text entry not only focuses that widget but sets the text insertion point to where the mouse click happens.
That's a *left* button click. To paste text you use the middle button and that *doesn't* move the cursor.
For many applications, for example editors, the major part of the main window is a form of text entry so here I would typically find that if I click in the application's main window to raise that window to the top it has the side effect of changing the text insertion point. The solution I have always used for this to to click on the title bar to raise an application instead.
This isn't the issue.
Let me try and describe it again. I'm talking about the 'classic' Unix copy/paste with the mouse where you copy text by dragging with the left button (button 1) pressed or, maybe, by multi-clicking the left button. You then paste that text by pressing the 'middle' button, that's button 3.
If you do this in a text window (Gnome Terminal, or an xterm) the text is always pasted at the text cursor position (usually the prompt) regardless of where you have left the mouse cursor. Thus you can go back to a previous command or the result of an ls, copy something and then paste it at the prompt without having to carefully reposition the *mouse* cursor back at the prompt. It also works this way in my (GUI) editor, xvile.
I.e. button 1 (left) selects text and/or moves the *mouse cursor*, button 3 (middle) pastes text (at the *text* cursor) but doesn't move the mouse cursor.
I want the same thing to happen in textareas and other GUIs, that's all. Unless I'm missing some configuration option I don't know about just about all applications I've tried (textareas in Firefox, Open Office, etc.) pastes the text at the *mouse* cursor position when I click button 3 even though text I enter from the keyboard is placed at the text cursor position.
Maybe no one uses a three (or more) button mouse nowadays so button 3 is emulated by pressing 1 and 2 simultaneously and thus there is a risk of it being seen as a button 1 press and moving the cursor.
I have always been careful to buy a mouse (or trackball) with a proper 3rd button so that there is no risk that the paste action will be ambiguous.
I'm not really expecting a solution to this problem, I was just having a bit of a rant at what seems like poor UI design common to almost every GUI app (apart from terminal windows and, maybe, a few editors). Unless, of course, there is some generic user interface option that I don't know about.