Go to page:

Search help:

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

KeyboardShortcutForCharacterStyles

<< Blocked keyboard shortcuts | Page list | Color >>

How to define a keyboard shortcut to work better with character styles.

From a post by Steve Litt

This is from a post by Steve on the users' lists.


Hi all,

1.5x might have made it easier, but 1.4x requires you to do the following in order to put something in a character style:

  1. Take your hand off the keyboard
  2. Grab the mouse
  3. Insert
  4. Character Style
  5. Pick which character style
  6. Put your hands back at home position
  7. Type the content
  8. Press arrow or Esc

Or, you can apply it to an already written word:

  1. Take your hand off the keyboard
  2. Grab the mouse
  3. Highlight the word(s) to be applied
  4. Insert
  5. Character style
  6. Pick which character style

Doing it to already written content is obviously easier, but requires you to remember what needs characterstyling. Neither is optimal. So I combined the the info given me from Dominik Waßenhoven, Jürgen Spitzmüller, and Paul Rubin to create this new litt.bind, which implements my often used Charcode and Ex character styles, making it a simple keystroke to start them, and a simple Alt+M keystroke to "walk out of" the character style (like right arrow or Esc would do).

Here's my litt.bind:

\bind_file /usr/share/lyx/bind/cua.bind
\bind "M-9" "charstyle-insert Charcode"
\bind "M-y" "charstyle-insert Ex"
\bind "M-m" "char-forward"

I've tucked it off on a backed up corner of my directory structure, so that LyX replacemnts won't harm it, and because cua.bind is included by reference, it will take advantage of new cua.bind features, as opposed to the LyX help file's idea of making a copy of cua.bind.

This has made the use of character styles faster and easier for me -- I hope it does the same for some of you. Thanks Dominik, Jürgen and Paul!

SteveT


Category: Character style, Keyboard shortcut

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2007-05-08 17:14 CEST