all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Javier <nospam@nospam.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Using AltGr as standard modifier key in emacs
Date: Tue, 13 Oct 2015 18:19:36 +0000 (UTC)	[thread overview]
Message-ID: <mvjhvo$26u$1@speranza.aioe.org> (raw)
In-Reply-To: mailman.256.1444758367.7904.help-gnu-emacs@gnu.org

> So my problem is not that I can not switch keyboard layout, the problem
> is that I want to have a working state which I can use 3rd level shift
> from inside Emacs input method or a workaround which give me ability to
> use Emacs keybindings (C- M- stuff) without changing keyboard layouts.

From the elisp manual, you can use several modifiers keys: alt,
meta, hyper and super

http://www.gnu.org/software/emacs/manual/html_node/elisp/X11-Keysyms.html
http://www.gnu.org/software/emacs/manual/html_node/elisp/Other-Char-Bits.html

          The X Window System defines three other modifier bits that can be
          set in a character: hyper, super and alt. The syntaxes for these
          bits are ???\H-???, ???\s-??? and ???\A-???.

So, for your question

> is there any way to work around this problem and assign a modifier key
> to "Right Alt Key" on keyboard which is accessible through elisp
> customization? something which I can assign a character (for example á
> to (kbd rightalt-a))?

you can play with xmodmap to do this and remap rightAlt to Hyper or super

Typing this in a terminal should do the trick

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

You can check inside emacs that things are working by using C-h l (view lossage)
If it is mapped ok, pressing RighAlt-a you should see

 H-a C-h l
 
Once this works you can customize RightAlt-a in elisp as

(kbd "H-a")
(kbd "s-b")

For hyper is a capital 'H' and for super it would be lower case 's'.

This might have some problems, like the desktop capturing the Hyper-a combination.
What desktop are you using? gnome? kde?

Another problem would be that applications outside emacs might not be
able to use rightAlt anymore.  That might still be solved running
emacs inside an X-server of its own.




  parent reply	other threads:[~2015-10-13 18:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.229.1444746928.7904.help-gnu-emacs@gnu.org>
2015-10-13 16:57 ` Using AltGr as standard modifier key in emacs Rusi
2015-10-13 17:05   ` Rusi
2015-10-13 17:44     ` Shahab Shahsavari Alavidjeh
     [not found]     ` <mailman.256.1444758367.7904.help-gnu-emacs@gnu.org>
2015-10-13 18:19       ` Javier [this message]
2015-10-13 18:43         ` Javier
2015-10-13 19:42           ` Shahab Shahsavari Alavidjeh
     [not found]           ` <mailman.265.1444765466.7904.help-gnu-emacs@gnu.org>
2015-10-13 20:17             ` Javier
2015-10-14  5:18               ` Shahab Shahsavari Alavidjeh
2015-10-13 19:20         ` Shahab Shahsavari Alavidjeh
2015-10-13 13:11 Shahab Shahsavari Alavidjeh
2015-10-14  6:05 ` Yuri Khan
2015-10-14  6:47   ` Shahab Shahsavari Alavidjeh
2015-10-14  9:54   ` tomas
     [not found] ` <mailman.289.1444802784.7904.help-gnu-emacs@gnu.org>
2015-10-14 12:17   ` Rusi
2015-10-15  1:47     ` Rusi
2015-10-15  2:23       ` Yuri Khan
     [not found]       ` <mailman.347.1444875907.7904.help-gnu-emacs@gnu.org>
2015-10-15  2:42         ` Rusi

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='mvjhvo$26u$1@speranza.aioe.org' \
    --to=nospam@nospam.com \
    --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.