Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

So, I'm typing on a standard EN-US Qwerty keyboard, where the \ key is in the top right below the backspace key. I find that LaTeX requires me to repeatedly type this key for macros and such, and that my wrists tend to get quite sore from constantly reaching for it.

I'm wondering, what strategies have been used to make this easier, both from an efficiency and an ergonomics standpoint? I realize that this question is fairly open ended, so there probably won't be one "right" answer, but I'm curious what different things people have done to overcome this over the years.

share|improve this question
1  
using the en_US keyboard is actually much more comfortable than using the de_DE Keyboard where the `is located besides the 0` as third key so you have to press CTRL + ALT or ALT GR to insert the `` character –  Rico Jun 10 '13 at 17:11
3  
Emacs. Do I have to say anything more? Ah, yes. AUCTeX. (And now the problem of "backslash is hard to reach" gets replaced by "control is hard to reach". But this is basically solved, see e.g. emacswiki.org/emacs/MovingTheCtrlKey) –  mbork Jun 10 '13 at 17:12
    
I'm not overly familar with Emacs. I was taught Vim in school, though I was never overly fond of it. Is the idea just that you use an Emacs macro to simulate "\"? –  jmite Jun 10 '13 at 17:13
    
Standard typing dictates that you should press "\" with right-hand little finger and B with left-hand point finger. I've seen many people type B with right-hand due to the fact that it is somehow in the middle. I'm not saying you're doing the same, but if you do, it might be the reason to this exhaust. A part from that, you can use snippets if your editor provides them (e.g. gedit does). I've found them very handy for programming. Finally, you can try to map "\" to another key if your operating system allows you to do so. –  Pouya Jun 10 '13 at 17:45
3  
@jmite: in Emacs+AUCTeX, you hardly ever have to press backslash: C-c C-m starts entering a (La)TeX macro (with autocompletion, of course). Also, C-c C-e inserts an environment template. Etc. –  mbork Jun 10 '13 at 17:53
add comment

2 Answers

You can try changing your layout to Spanish.

All the letter will be the in the same place (Spanish only has one extra letter: ñ, which will be where the ; is.

The \ will be on your top left corner left to the 1.

Take a look at this:

enter image description here

share|improve this answer
add comment

You should be able to remap keys as you please. It is easy on systems where xmodmap is available. (In this example, I'm using Ubuntu 12.10). We can, e.g., remap 'caps lock' to be 'backslash' using the following command.

[EDIT: I forgot the caps lock requires special handling to avoid having it continue to switch between its normal toggling between caps and lowercase. For this example, it is important to run this command as well: xmodmap -e "clear lock".]

xmodmap -e "keycode 66 = backslash"

In order to find out what keycode you need, you use xev. Open a terminal and type: xev. Then while it is active, if you hit the backslash key, you'll get the following output in the terminal (I'm using a standard US layout with dead keys):

KeyPress event, serial 46, synthetic NO, window 0x3a00001,
    root 0xc8, subw 0x0, time 13613662, (85,91), root:(1712,536),
    state 0x10, keycode 51 (keysym 0x5c, backslash), same_screen YES,
    XLookupString gives 1 bytes: (5c) "\"
    XmbLookupString gives 1 bytes: (5c) "\"
    XFilterEvent returns: False

Caps lock will give you:

KeyRelease event, serial 46, synthetic NO, window 0x3a00001,
    root 0xc8, subw 0x0, time 13611758, (85,91), root:(1712,536),
    state 0x12, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Thus, the xmodmap command has mapped keycode 66 to backslash. But this will only work for the current X session. If you want to make the switch permanent, you can do this command (after the first xmodmap):

xmodmap -pke > ~/.xmodmaprc

which gives you an xmodmap-readable file in your home directory which includes your recent modifications, and which should be read at the start of the current user's subsequent sessions.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.