help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inputting characters with specialist diacritic marks in emacs


From: Emanuel Berg
Subject: Re: Inputting characters with specialist diacritic marks in emacs
Date: Tue, 19 Jan 2016 20:45:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

mikew2801@gmail.com writes:

> (global-set-key (kbd "C-c y") (lambda () (interactive)
> (insert "ñ"))) ...
>
> This is not ideal since it's quite difficult to type
> these bindings.

Do you mean it is difficult/tedious to hit those
keystrokes or do you mean it is a lot of work setting
them up?

If it is difficult/tedious, come up with better
shortcuts! (But `C-c y' is fine in that sense what
I can see.)

If it is a lot of work setting it up, either use
kill/yank, or write a script to automatize it if you
have several hundred such chars - but if you do,
you'll have to come up with a more refined keyboard
scheme as well otherwise the shortcuts will be
depleted before long...

> In Linux I use Ibus mappings which involve
> double-tapping a similar key (e.g., when I type
> "a-a" I get "ā", when I type "i-i" I get "ī" and
> so on.

Yes, this is the best solution, to have a
*compose key* which works in Linux in general and in
Emacs the exact same way (with Emacs running on Linux,
of course).

For example, I, as a programmer, am so used to coding
and writing (in English). So I want the Anglo-American
keyboard layout for both purposes. But when I write in
Swedish, which I do say once a day - even tho it is
a 100th or so of all my writing - it is a small part
but not small enough to be neglected, *then*, I still
cannot use the Swedish layout, as that would bring
havoc to my brain as so many chars would change place
on the keyboard. Still (again) I need the å, ä, and
ö chars which are in the Swedish alphabet but not
the English.

The solution is the compose key, which in the
Linux VTs (the ttys, or "the console") are setup like
I show soon. But, you probably don't use the ttys, so
I show this just to illustrate the principle. In X,
you can do the same, of course, just not the same way.

Good luck!

Relevant part from: /etc/console-setup/remap.inc

Whole file: http://user.it.uu.se/~embe8573/conf/remap.inc

### compose key
##
## To make the compose key work,
## see the setting in /etc/default/keyboard
## if that doesn't work, use showkey(1)
## to get the desired keycode, and:

keycode 125 = Compose

## setup the combinations one by one;
## output current state with 'dumpkeys --compose-only' [1]

## [1] for these to work in a tmux session, use:
##     $ sudo chmod +s /usr/bin/showkey # ditto /bin/dumpkeys

compose '"'  'A' to U+00C4 # Ä
compose '"'  'a' to U+00E4 # ä
compose '"'  'O' to U+00D6 # Ö
compose '"'  'o' to U+00F6 # ö
compose '"'  'U' to U+00DC # Ü
compose '"'  'u' to U+00FC # ü
compose '/'  'A' to U+00C1 # Á
compose '/'  'a' to U+00E1 # á
compose '/'  'E' to U+00C9 # É
compose '/'  'e' to U+00E9 # é
compose '/'  'I' to U+00CD # Í
compose '/'  'i' to U+00ED # í
compose '/'  'O' to U+00D3 # Ó
compose '/'  'o' to U+00F3 # ó
compose '/'  'U' to U+00DA # Ú
compose '/'  'u' to U+00FA # ú
compose '0'  'A' to U+00C5 # Å
compose '0'  'a' to U+00E5 # å
compose '\\' 'A' to U+00C0 # À
compose '\\' 'a' to U+00E0 # à
compose 'o'  'A' to U+00C5 # Å
compose 'o'  'a' to U+00E5 # å

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]