Swap Paste Keycombos in Thunderbird

All one needs do is swap the key-bindings for Ctrl-V and Ctrl-Shift-V. This is done in two files within the file omni.ja, a large zipped file containing most of the Javascript and XML that runs Thunderbird. The one first is:
c:\Program Files (x86)\Mozilla Thunderbird\omni.ja\chrome\toolkit\content\global\platformHTMLBindings.xml (On non-x64 Windows machines, remove the " (x86)" above)

  • First, make a copy, in the same folder, of omni.ja, such as omni.ja.bak, just in case you mess it up.
  • Rename omni.ja to omni.zip
  • Unzip it into an empty folder such as C:\temp
  • Navigate to C:\temp\chrome\toolkit\content\global\ and find platformHTMLBindings.xml
  • Open it in a text editor
  • Search for pasteNoFormatting and see these two lines:
    <handler event="keypress" key="v" command="cmd_paste" modifiers="accel"/>
    <handler event="keypress" key="v" command="cmd_pasteNoFormatting" modifiers="accel, shift"/>
  • Drag and drop the ", shift" part up into the line above it, thus:
    <handler event="keypress" key="v" command="cmd_paste" modifiers="accel, shift"/>
    <handler event="keypress" key="v" command="cmd_pasteNoFormatting" modifiers="accel"/>
  • Now you have swapped the commands associated with Ctrl-V and the Ctrl-Shift-V.
  • Save the file and close the editor.
  • Now locate and edit C:\temp\chrome\messenger\content\messenger\messengercompose\messengercompose.xul.
    Search for key_paste and see these three lines:
    <key id="key_paste" key="&pasteCmd.key;" modifiers="accel"/>
    <key id="pastequotationkb" key="&pasteAsQuotationCmd.key;"
    observes="cmd_pasteQuote" modifiers="accel, shift"/>
    <key id="pastenoformattingkb" key="&pasteNoFormattingCmd.key;"
    modifiers="accel, shift" observes="cmd_pasteNoFormatting"/>
  • ...and move that comma and shift up into the modifiers in the “key_paste” line, thus:
    <key id="key_paste" key="&pasteCmd.key;" modifiers="accel, shift"/>
    <key id="pastequotationkb" key="&pasteAsQuotationCmd.key;"
    observes="cmd_pasteQuote" modifiers="accel, shift"/>
    <key id="pastenoformattingkb" key="&pasteNoFormattingCmd.key;"
    modifiers="accel" observes="cmd_pasteNoFormatting"/>
  • Now you have swapped the Ctrl-V and the Ctrl-Shift-V on the Edit menu (it will not work unless you do so).
  • Save the file and close the editor.
  • Now Zip up the whole folder structure as omni.zip (make sure your zip does “recurse folders and store pathnames” or similar wording).
  • Rename it to omni.ja
  • Copy it over the old omni.ja in the Thunderbird install folder.
  • Now nav to {youruserprofile}\AppData\Local\Thunderbird\Profiles\{whatever}.default\startupCache\startupCache.4.little (or similar) and DELETE it. If you don't, the old settings will still be cached.
  • Fire up Thunderbird and see if it works. Start a New message and look at the edit menu. The Paste and Paste Without Formatting keys should be reversed:  
    Paste = Ctrl+Shift+V
    Paste Without Formatting = Ctrl-V
  • Open a browser and select and copy something.
  • Paste it into a new message with Ctrl-V. It should paste as plain text in the email’s default body font.
  • Now try pasting it with the Edit menu commands. It should paste as the commands say: Paste will be with formatting.

All done.