2

I am using international keyboard and extensively use AltGr key. There are many unused keys with AltGr so I would like to map AltGr+t = Crtl+x. I don't want to remap AltGr to Crtl; I just want to use this specific instance.

I am using debian with Gnome. May I map this combination with xkb?

  • I'm pretty sure you can't do it from inside Emacs, you have to remap AltGr+T to a distinctive key at the xmodmap/XKB level. – Gilles 'SO- stop being evil' Aug 27 '17 at 16:24
1

First check what emacs gets when you hit AltGr+t. You can do so by invoking C-h c AltGr+t. With my keyboard configuration, this is ŧ (a character).

You can then (global-set-key (kbd "ŧ") ctl-x-map).

In the event that you don't get a character, or that it is a too common character (e.g. 't' itself), you'll first want to configure your system with xmodmap to change that.

  • This works and runs without problem. – ofenerci Aug 28 '17 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.