all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Javier" <invalid@invalid.invalid>
To: help-gnu-emacs@gnu.org
Subject: Re: Mapping AltGr+t key as a Ctrl+x (How to use AltGr key effectively in	Emacs)
Date: Sun, 27 Aug 2017 22:11:27 +0000 (UTC)	[thread overview]
Message-ID: <onvg2f$19c0$1@gioia.aioe.org> (raw)
In-Reply-To: mailman.13896.1503852696.21957.help-gnu-emacs@gnu.org

> 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

You can remap rightAlt to Hyper or super.

xmodmap -e "keycode 108 = Hyper_L" ; xmodmap -e  "add mod4 = Hyper_L"

In my keyboard right alt is keycode 108, but that depends on your keyboard layout.

You can look at keysymdef.h for the keynames.

#define XK_Super_L                       0xffeb  /* Left super */
#define XK_Super_R                       0xffec  /* Right super */
#define XK_Hyper_L                       0xffed  /* Left hyper */
#define XK_Hyper_R                       0xffee  /* Right hyper */


Hyper and Super modifiers will be seen inside emacs.  Use C-h l (view lossage)
If it is mapped ok, pressing RighAlt-a you should see

 H-a C-h l

Your window manager might be catching the Hyper-a combination before it arrives to emacs.
If so, use super instead of hyper.

Once this works you can customize RightAlt-a in elisp as

(global-set-key (kbd "H-a") 'function)

or (kbd "s-b") for super.

Note that you map it to a function.  I don't think you can remap it to C-x

The problem with all this is that applications outside emacs will not see
AltGr anymore.



  parent reply	other threads:[~2017-08-27 22:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.13896.1503852696.21957.help-gnu-emacs@gnu.org>
2017-08-27 21:23 ` Mapping AltGr+t key as a Ctrl+x (How to use AltGr key effectively in Emacs) Ben Bacarisse
2017-08-27 22:11 ` Javier [this message]
2017-08-27 16:14 ozhan fenerci

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='onvg2f$19c0$1@gioia.aioe.org' \
    --to=invalid@invalid.invalid \
    --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.