Accessibility Tweak: How to prevent accidentally selected text from getting replaced when typing?

The selected text is copied to PRIMARY selection buffer. You could monitor it and send Right arrow key if it changes, to move to the end of the selected text. This works with any application, not only LibreOffice/Thunderbird, at least on X11+GNOME.

# Install dependencies
sudo apt install xdotool  git build-essential libx11-dev libxtst-dev

# Compile clipnotify
git clone https://github.com/cdown/clipnotify.git
cd clipnotify
make

# Run the monitor, could be on ~/.xprofile, or under ~/.config/autostart/
while ./clipnotify;do xdotool key Right; done

# Optional: To kill the monitor on any other Terminal
killall clipnotify

Probably are better ways to do this, maybe using Dbus.

Inspiration and useful links:

  • bash - Detect clipboard copy/paste event and modify clipboard contents - Ask Ubuntu.
  • Arch Wiki

Partial answer

  • (2) LiberOffice, Thunderbird and Firefox, each has its own implementation of text edit box.

    But there many tool that are build on top of a GUI kit like GTK, Qt, wxWidgets,.. So you may expect Gnome tools to be GTK based and KDE tools to be based on Qt. So change may be required at their level.

  • (3) With LibreOffice, I have only found this feature that may help:

    • Change the "selection mode" at the bottom status bar to "Block selection". Still can select with mouse but not double click.
  • (3) For Mouse Accessibility, I don't remember any action that require double-click (Only CAD, Games, IDE). Usually, tools have other way using keyboard shortcut or menu entry.

    • Disable double-click, Settings → Accessibility → Double-click Delay: Shortest (minimum).
  • (3) Mouse Settings, The previous step does not fix selection by Drag. A trick that may work is killing short moves by lowering pointer speed and raising its acceleration to compensate for long moves.

    • Settings → Mouse & Touchpad → Mouse Speed: Lower

    • Mouse Acceleration: Higher using

      xset [mouse [accel_mult[/accel_div] [threshold]]] [mouse default]
      

      (Permanent setting, should be a way using libinput or X)

  • (3) Minimize use of mouse for short moves (It may be hard to adapt)

    • Use of keyboard to move
    • Activate keyboard mouse keys, Settings → Accessibility → Mouse Keys
    • Change to TrackBall mouse