all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Translating keys
@ 2005-10-16 19:58 Elena Garrulo
  2005-10-16 20:18 ` Peter Dyballa
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Elena Garrulo @ 2005-10-16 19:58 UTC (permalink / raw)


Hello,

	I'd like to translate some keys in a mode dependent way. For example, when in c-mode, the key which 
prints "ò" should print "{"; when in text-mode should print the original character. Since the 
translation should be mode dependent, keyboard-translate is not a viable option. I've tried:

(local-set-key "ò" (lambda () (interactive) (insert "{")))

but it doesn't work. It works with other keys, for example:

(local-set-key "a" (lambda () (interactive) (insert "{")))

I think I should know the code generated by the key. Is there a way?

Anyway, the "insert" function is not useful, because the generated character does not behave like 
the original one (I've electric C enabled and the { generated by "insert" is not recognized as 
electric; the original { is).

Any help?

Thanks.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2005-10-21  8:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-16 19:58 Translating keys Elena Garrulo
2005-10-16 20:18 ` Peter Dyballa
     [not found] ` <mailman.11540.1129493899.20277.help-gnu-emacs@gnu.org>
2005-10-16 22:07   ` Elena Garrulo
2005-10-17  0:07     ` Peter Dyballa
2005-10-17  2:10 ` Pascal Bourguignon
2005-10-17 10:48   ` Mounir AITTAHAR
2005-10-17 13:27     ` Pascal Bourguignon
2005-10-17 15:15       ` Mounir AITTAHAR
2005-10-18 14:52         ` Mounir AITTAHAR
2005-10-18 16:50           ` Pascal Bourguignon
2005-10-19  8:29             ` Mounir AITTAHAR
2005-10-19 23:09     ` Stefan Monnier
2005-10-20  8:22       ` Mounir AITTAHAR
2005-10-20  9:09         ` Mounir AITTAHAR
2005-10-20  8:38       ` Mounir AITTAHAR
2005-10-21  8:37         ` Translating keys [solved] Mounir AITTAHAR
2005-10-17  3:03 ` Translating keys Stefan Monnier

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.