From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Javier Newsgroups: gmane.emacs.help Subject: Re: Using AltGr as standard modifier key in emacs Date: Tue, 13 Oct 2015 18:19:36 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: <902f4b3f-2c82-4d07-b940-67278871bde3@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1444760478 16461 80.91.229.3 (13 Oct 2015 18:21:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2015 18:21:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 13 20:21:18 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zm4CH-0006VT-9r for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Oct 2015 20:21:13 +0200 Original-Received: from localhost ([::1]:38532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm4CG-0008FU-4c for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Oct 2015 14:21:12 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 48 Original-NNTP-Posting-Host: miwrTBUc11pFN9YlsnJ7Hg.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (Linux/3.18.6-1-ARCH (x86_64)) X-Notice: Filtered by postfilter v. 0.8.2 Original-Xref: usenet.stanford.edu gnu.emacs.help:215330 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107614 Archived-At: > 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.