From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Javier" Newsgroups: gmane.emacs.help 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) Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1503872131 27806 195.159.176.226 (27 Aug 2017 22:15:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 27 Aug 2017 22:15:31 +0000 (UTC) User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (Linux/3.18.6-1-ARCH (x86_64)) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 28 00:15:25 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dm5pz-0006p6-QD for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Aug 2017 00:15:23 +0200 Original-Received: from localhost ([::1]:35781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dm5q6-0006vZ-DT for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Aug 2017 18:15:30 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!nzgate1.xs4all.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!feeder.erje.net!1.eu.feeder.erje.net!news.unit0.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: NKiK/78VzkSsCXQNY7kvbQ.user.gioia.aioe.org Original-X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 Original-Xref: usenet.stanford.edu gnu.emacs.help:220008 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:114109 Archived-At: > 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.