FaqAlteringToolbarsAndKeyboardShortcuts

From AbiWiki

Jump to: navigation, search

Question

Can end users alter toolbars or create keyboard shortcuts?

I tend to take notes in class, and I need quick ways to use superscripts, subscripts, bullets, decreases and increases of indents. The toolbars are full of buttons I mostly wouldnt use but for those few commands, and Id like to do them from the keyboard directly. Anyone have any ideas?

Answer

You can't create new shortcuts, though shortcuts do (or easily could) exist for the few things the poster did ask:

    Superscript: Ctrl+=
    Subscript: Ctrl+-

If you are using the UNIX/GTK+ version of Abi, you can re-arrange toolbars by dragging and dropping the icons.

However (at least as of version 2.2.9), you cannot re-arrange tools that call up multiple selections, such as font, point size, zoom level, styles, font color, and highlight colors.

To move, change or remove these, you must edit the file AbiWord.Profile, which is created in the hidden .AbiSuite folder of your home directory after you make custom settings in the usual way. (Don't bother trying if you run Abiword under Microsoft Windows; any toolbar lines you add will disappear when you start the program.)

The developers, as noted in IntlFaqSettingDefaultLanguageOfDocuments, do not advise editing this file, and appear to have made its format difficult in order to discourage editing. However, after fiddling with AbiWord.Profile and restarting AbiWord a few hundred times, I have found that changing toolbar entries is straightforward once you understand what some numbers stand for.

If you really mess up AbiWord.Profile, you can just delete the file. AbiWord will revert to the defaults, and make a new file when you customize its settings again. To save yourself the trouble of re-customizing, make a backup copy.

AbiWord cannot be running when you edit AbiWord.Profile, so you must use another text editor.

Do not touch anything outside the custom settings section, which begins with

   <Scheme
   name="_custom_"

and ends with

   />

Because the order of entries is jumbled, it may be easier to use an editor that can sort lines. Sort only the entries of the custom section. AbiWord will rearrange the entries to its liking when it starts.

What you are about to do is this: For each tool, you need to find a pair of lines scattered somewhere. You can change one line to hide or show the tool. You can change the other line to change tools. Or you can remove _both_ lines to utterly delete the tool.

AbiWord numbers the toolbars from 1 to 4. In AbiWord.Profile they are named:

 1. FileEditOps
 2. FormatOps
 3. TableOps
 4. ExtraOps


Within each toolbar, tools are numbered from the left, starting with 0. For example, the first tool on toolbar 1 is FileEditOps0.

The two lines for that tool are:

 Toolbar_ID_FileEditOps0="1"
 Toolbar_Flag_FileEditOps0="0"


Toolbar_ID specifies the tool -- in this case 1, the tool to create a new document. To get a different tool, change the number according to the list below.

Toolbar_Flag sets whether the tool is visible (0) or hidden (1).

Separators are a special case. Their Toolbar_ID number is 0, and they are shown if the Toolbar_Flag is set to 1 (rather than the usual 0).

If you delete a pair of entries controlling a tool, the numbers of those remaining will be adjusted when AbiWord starts.

Each toolbar also has a line that counts the tools such as

  Toolbar_NumEntries_FileEditOps="21" 

Do not change it. It will update itself if necessary when AbiWord starts.

Note that if you put more tools on a toolbar than fit on your screen, those on the right will vanish, with no indicator that there are more.

That is all there is to making custom AbiWord toolbars. Two lines per tool, one number per line.

the Toolbar_ID numbers:

   0  separator
   1  create new document
   2  open document
   3  save named document
   4  save as ...
   5  print
   6  preview before printing
   7  undo
   8  redo
   9  cut
   10 copy
   11 paste
   12 edit header
   13 edit footer
   14 remove header
   15 remove footer
   16 spellcheck
   17 insert image
   18 style selector
   19 font
   20 insert hyperlink
   21 insert bookmark
   22 point size
   23 bold
   24 italics
   25 underline
   26 overline
   27 strikeout
   28 topline
   29 bottomline
   30 help
   31 superscript
   32 subscript
   33 insert symbol
   34 left alignment
   35 center alignment
   36 right alignment
   37 justified alignment
   38 space before (each line): none
   39 space before: 12 pt
   40 single spacing
   41 1.5 spacing
   42 double spacing
   43 single column
   44 double column
   45 triple column
   46 show/hide formatting
   47 zoom level
   48 bullets
   49 numbering
   50 font color
   51 highlight color
   52 increase indent
   53 decrease indent
   54 execute script
   55 apply formatting of previously copied text
   56 force left-to-right text direction
   57 force right-to-left text direction
   58 reverse left/right alignment
   59 insert table
   60 add row to table
   61 add column to table 
   62 delete row
   63 delete column
   64 merge cells
   65 split cell

Contributors

Personal tools