* rebinding iso keys
@ 2006-04-02 12:33 josh
2006-04-02 13:20 ` Peter Dyballa
[not found] ` <mailman.290.1143984033.2481.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 9+ messages in thread
From: josh @ 2006-04-02 12:33 UTC (permalink / raw)
Hi,
I have a german keyboard and would like to rebind the characters "ä"
"ö"
"ü" and also "ß" to functions, replacing the self-insert function,
but I
can't find the right vector code or whatever for the keys.
For example, I've tried the following variations (from my .emacs):
(defun TeX-parenth () (interactive) (TeX-Inserting ?\\ "(" "()"))
(defun TeX-a-umlaut () (interactive) (insert "\"") (insert "a"))
(add-hook 'LaTeX-mode-hook
'(lambda ()
;; Begin bracket closing
(local-set-key "(" 'TeX-parenth)
(local-set-key "ä" 'TeX-a-umlaut)
(local-set-key [?\xe4] 'TeX-a-umlaut) ;iso ?
(local-set-key [?\xc384] 'TeX-A-umlaut) ;unicode ?
))
It works for the parenthesis, but not for "ä", and actually, I would
like to
keep my .emacs in ascii, so I don't really even want the "ä"
variation.
Two questions:
1) what am I doing wrong and
2)How can I capture the right vector code that the keyboard sends to
emacs when I press "ä", so I can bind it properly?
Thanks,
Josh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rebinding iso keys
2006-04-02 12:33 rebinding iso keys josh
@ 2006-04-02 13:20 ` Peter Dyballa
[not found] ` <mailman.290.1143984033.2481.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2006-04-02 13:20 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 02.04.2006 um 14:33 schrieb josh:
> can't find the right vector code or whatever for the keys.
Try to set the keys interactively first. Then do repeat-complex-
command and grab and save the interactive key binding:
C-x ESC ESC C-a C-k C-g C-x b .emacs RET C-y C-x C-s
You could start your .emacs file with
;;; -*- mode: lisp; coding: us-ascii; -*-
The variable file-coding-system-alist could be set to handle files
ending in .emacs to be of a certain coding system ...
--
Mit friedvollen Grüßen
Pete
Diese Nachricht wurde mit einer Taschenlampe
ins offene Ende eines Glasfaserkabels gemorst.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rebinding iso keys
[not found] ` <mailman.290.1143984033.2481.help-gnu-emacs@gnu.org>
@ 2006-04-03 18:39 ` josh
2006-04-03 20:19 ` Peter Dyballa
[not found] ` <mailman.11.1144110174.9609.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 9+ messages in thread
From: josh @ 2006-04-03 18:39 UTC (permalink / raw)
Hi Peter,
Thanks for your reply, it worked!
I still have two questions:
1) binding interactively, executing repeat-complex-command, and then
yanking out of the mini-buffer was certainly a clever idea to get what
I wanted, but what's the "real" way? Is there no way to look up the
correct code? Where is it stored?
2) what was wrong with what I tried:
(local-set-key "ä" 'TeX-a-umlaut)
(local-set-key [?\xe4] 'TeX-a-umlaut) ;iso ?
(local-set-key [?\xc384] 'TeX-A-umlaut) ;unicode ?
-j
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rebinding iso keys
2006-04-03 18:39 ` josh
@ 2006-04-03 20:19 ` Peter Dyballa
[not found] ` <mailman.11.1144110174.9609.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2006-04-03 20:19 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 03.04.2006 um 20:39 schrieb josh:
> 2) what was wrong with what I tried:
>
> (local-set-key "ä" 'TeX-a-umlaut)
> (local-set-key [?\xe4] 'TeX-a-umlaut) ;iso ?
> (local-set-key [?\xc384] 'TeX-A-umlaut) ;unicode ?
>
These are all /your/ ideas about this "key code." Obviously GNU Emacs
has its own. What is GNU Emacs' idea of ä, i.e. what is your code?
--
Mit friedvollen Grüßen
Pete
The day Microsoft makes something that doesn't suck
is the day they start selling vacuum cleaners.
Ernest Jan Plugge
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rebinding iso keys
[not found] ` <mailman.11.1144110174.9609.help-gnu-emacs@gnu.org>
@ 2006-04-04 11:52 ` josh
2006-04-04 11:57 ` Miles Bader
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: josh @ 2006-04-04 11:52 UTC (permalink / raw)
Hi Peter,
>These are all /your/ ideas about this "key code." Obviously GNU Emacs
>has its own. What is GNU Emacs' idea of ä, i.e. what is your code?
yes (except that "ä" should still be "ä"), which is why I asked
question number 1) above:
>1) binding interactively, executing repeat-complex-command, and then
>yanking out of the mini-buffer was certainly a clever idea to get what
>I wanted, but what's the "real" way? Is there no way to look up the
>correct code? Where is it stored?
So, where is this stored, and how can I look up the code? Like I said,
using repeat-complex-command was clever, but what's the "real" way of
doing this?
-j
p.s. here's another good windoze quote:
"A computer without M$-Windows is like a piece of chocolate cake
without mustard and ketchup"
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rebinding iso keys
2006-04-04 11:52 ` josh
@ 2006-04-04 11:57 ` Miles Bader
[not found] ` <mailman.25.1144152547.9609.help-gnu-emacs@gnu.org>
2006-04-04 18:48 ` Peter Dyballa
2 siblings, 0 replies; 9+ messages in thread
From: Miles Bader @ 2006-04-04 11:57 UTC (permalink / raw)
"josh" <jbuhl_nospam@gmx.de> writes:
> So, where is this stored, and how can I look up the code? Like I said,
> using repeat-complex-command was clever, but what's the "real" way of
> doing this?
You can position the cursor over the character in a buffer (ä in this
case), and use `C-x =' to see its "emacs code".
-Miles
--
"Nah, there's no bigger atheist than me. Well, I take that back.
I'm a cancer screening away from going agnostic and a biopsy away
from full-fledged Christian." [Adam Carolla]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rebinding iso keys
[not found] ` <mailman.25.1144152547.9609.help-gnu-emacs@gnu.org>
@ 2006-04-04 18:24 ` josh
2006-04-13 20:49 ` Oliver Scholz
0 siblings, 1 reply; 9+ messages in thread
From: josh @ 2006-04-04 18:24 UTC (permalink / raw)
Hi Miles,
cool, thanks! This clears up some of my confusion, since C-x = produces
Char: ä (04344, 2276, 0x8e4, file ...) point=192 of 192 (99%) column 0
and now not only does the following (produced using
repeat-complex-command as suggested above) work:
(local-set-key (quote [2276]) (quote TeX-a-umlaut))
but also
(local-set-key [?\x8e4] 'TeX-a-umlaut)
e4 being the iso code for "ä" (as I recall, at least). My last
question is now, why the "8" ?
-j
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rebinding iso keys
2006-04-04 11:52 ` josh
2006-04-04 11:57 ` Miles Bader
[not found] ` <mailman.25.1144152547.9609.help-gnu-emacs@gnu.org>
@ 2006-04-04 18:48 ` Peter Dyballa
2 siblings, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2006-04-04 18:48 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 04.04.2006 um 13:52 schrieb josh:
>> 1) binding interactively, executing repeat-complex-command, and then
>> yanking out of the mini-buffer was certainly a clever idea to get
>> what
>> I wanted, but what's the "real" way? Is there no way to look up the
>> correct code? Where is it stored?
>
> So, where is this stored, and how can I look up the code? Like I said,
> using repeat-complex-command was clever, but what's the "real" way of
> doing this?
I can't tell! I think I've seen a few times that the data C-h k gave
me did not work in global-set-key. From this list I knew this trick
and use it excessively and successfully.
I think GNU Emacs uses environment variables like LC_CTYPE, LC_ALL,
LANG to determine in which format data from the keyboard enters. I
have some UTF-8 set. I have from this setting the problem of
converting UTF-8 to ISO 8859-15 encoding as used in my .emacs. When
you use the trick of interactively binding a key and retrieving it
with repeat-complex-command, you insert for example UTF-8 data from
the keyboard that is automatically converted into ISO 8859-15 format!
Variables and commands used in this area are set-keyboard-coding-
system, set-terminal-coding-system, set-clipboard-coding-system, set-
selection-coding-system, ...
--
Mit friedvollen Grüßen
Pete
Das Militär ist eine Pflanze, die mensch sorgfältig pflegen muss,
damit sie keine Früchte trägt. (Jacques Tati)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rebinding iso keys
2006-04-04 18:24 ` josh
@ 2006-04-13 20:49 ` Oliver Scholz
0 siblings, 0 replies; 9+ messages in thread
From: Oliver Scholz @ 2006-04-13 20:49 UTC (permalink / raw)
"josh" <jbuhl_nospam@gmx.de> writes:
> Hi Miles,
>
> cool, thanks! This clears up some of my confusion, since C-x = produces
>
> Char: ä (04344, 2276, 0x8e4, file ...) point=192 of 192 (99%) column 0
>
[...]
>
> (local-set-key [?\x8e4] 'TeX-a-umlaut)
>
> e4 being the iso code for "ä" (as I recall, at least). My last
> question is now, why the "8" ?
E4 is indeed the ISO 8859-X code for "ä", but that is not the point
here. 8E4 is the code point for the character "ä" (well, for one of
the "ä"-characters) in Emacs internal coding system `emacs-mule'.
Oliver
--
24 Germinal an 214 de la Révolution
Liberté, Egalité, Fraternité!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-04-13 20:49 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-02 12:33 rebinding iso keys josh
2006-04-02 13:20 ` Peter Dyballa
[not found] ` <mailman.290.1143984033.2481.help-gnu-emacs@gnu.org>
2006-04-03 18:39 ` josh
2006-04-03 20:19 ` Peter Dyballa
[not found] ` <mailman.11.1144110174.9609.help-gnu-emacs@gnu.org>
2006-04-04 11:52 ` josh
2006-04-04 11:57 ` Miles Bader
[not found] ` <mailman.25.1144152547.9609.help-gnu-emacs@gnu.org>
2006-04-04 18:24 ` josh
2006-04-13 20:49 ` Oliver Scholz
2006-04-04 18:48 ` Peter Dyballa
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.