[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rebinding keys
From: |
Nicolas Neuss |
Subject: |
Re: Rebinding keys |
Date: |
Mon, 25 Mar 2013 22:48:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
Peter Münster <pmlists@free.fr> writes:
> On Mon, Mar 25 2013, Nicolas Neuss wrote:
>
>>> Why is (insert "]") more useful than "ä"?
>>
>> I often write English texts.
>
> Thanks. So kind of "if LaTeX then English, else German".
> (Be aware, that you'll need to change your habits when LaTeXing German
> texts... ;)
Not really. See below.
> If you ever need such special key-mappings outside of emacs, I recommend
> xmodmap.
Yes. Maybe I wasn't clear enough, but on my Linux laptop I do the same
with my .xmodmap containing the following:
--8<---------------cut here---------------start------------->8---
keycode 47 = bracketleft braceleft odiaeresis Odiaeresis odiaeresis Odiaeresis
keycode 48 = bracketright braceright adiaeresis Adiaeresis adiaeresis Adiaeresis
keycode 34 = backslash asciitilde udiaeresis Udiaeresis udiaeresis Udiaeresis
keycode 115 = Alt_L
--8<---------------cut here---------------end--------------->8---
[You see, that I can obtain the German umlaute as a two-key combination
with Alt-R. So I lose a little bit of typing speed with those, but
\~{}[] (which are frequently used in LaTeX with any language) are
single-key characters and faster to type.]
However, I (or, more precisely, my son) has got a Macintosh Power Book
and wants to use Aquamacs. Since, the .xmodmap technique does not work
(I still have to try the suggestion with Ukulele), I reverted to
redefining keys in Emacs as a first remedy.
> For example, I use the following script for switching between
> French and German:
>
> #!/bin/bash
>
> # change between french and german keyboard
>
> DIR=~/.fvwm
> FLAG=$DIR/french
> FRENCH=$DIR/Xmodmap.french
> GERMAN=$DIR/Xmodmap.german
>
> if [ "$1" = german ] || [ -f $FLAG -a -z "$1" ]; then
> xmodmap $GERMAN
> rm -f $FLAG
> else
> xmodmap $FRENCH
> touch $FLAG
> fi
OK, that's probably a good idea.
Thanks for the feedback,
Nicolas