From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: remapping keys
Date: Wed, 20 Feb 2008 14:53:26 -0500 [thread overview]
Message-ID: <jwvzltvifab.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 47b9b97c$0$37201$4fafbaef@reader3.news.tin.it
>>> Hi. I'm an Emacs newbie and I need help about remapping keyboard keys.
>>> I would like to bind the curly brackets "}" and "{" to another keys, handier
>>> to me (I have an italian keyboard, so the key sequence for the brackets is
>>> quite clumsy...)
>>> What's the procedure for doing so ?
>> It all depends on how you want the remapping to behave. Do you want
>> this remapping only within Emacs?
> Yes.
>> Do you want it to apply to things
>> like C-{ and M-}? How about C-x { ?
> Yes, why not ?
Because that's more difficult (unless you answered "no" to the previous
question, in which case it's easier instead).
You could try
(define-key key-translation-map "{" "f")
(define-key key-translation-map "}" "g")
and if you want to use "f" and "g" for { and }, then add
(define-key key-translation-map "f" "{")
(define-key key-translation-map "g" "}")
Note that it will apply to C-x { but not to C-{ and M-{, C-f, C-g, tho
it will apply to ESC { and ESC g. I.e. it's kind of messy.
>> I personally prefer to do those kinds of "inconvenient keyboard" things
>> globally by choosing another keyboard layout (e.g. with
>> gnome-keyboard-properties).
> I would prefer a more selective approach, remapping only the keys I need.
Define your own keyboard layout?
Stefan
next prev parent reply other threads:[~2008-02-20 19:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-18 11:35 remapping keys Seldon
2008-02-18 16:14 ` Stefan Monnier
2008-02-18 17:00 ` Seldon
2008-02-18 19:04 ` muede73
2008-02-25 10:45 ` Seldon
2008-02-19 2:01 ` Juanma
[not found] ` <mailman.7615.1203400883.18990.help-gnu-emacs@gnu.org>
2008-02-19 16:33 ` Seldon
2008-02-20 0:32 ` Sam Peterson
2008-02-20 2:12 ` Juanma
2008-02-20 19:53 ` Stefan Monnier [this message]
2008-02-27 20:29 ` Hans Ekbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvzltvifab.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.