From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Shahab Shahsavari Alavidjeh Newsgroups: gmane.emacs.help Subject: Re: Using AltGr as standard modifier key in emacs Date: Tue, 13 Oct 2015 22:50:17 +0330 Message-ID: <87pp0ir2xa.fsf@fedora22.zzgraph> References: <902f4b3f-2c82-4d07-b940-67278871bde3@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1444764103 17502 80.91.229.3 (13 Oct 2015 19:21:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Oct 2015 19:21:43 +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 21:21:36 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 1Zm58b-0007yw-5f for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Oct 2015 21:21:29 +0200 Original-Received: from localhost ([::1]:38954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm58a-0001cy-8m for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Oct 2015 15:21:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm57b-0001V0-NY for help-gnu-emacs@gnu.org; Tue, 13 Oct 2015 15:20:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zm57W-00021N-RB for help-gnu-emacs@gnu.org; Tue, 13 Oct 2015 15:20:27 -0400 Original-Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:36074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm57W-00021J-Kz for help-gnu-emacs@gnu.org; Tue, 13 Oct 2015 15:20:22 -0400 Original-Received: by wicgb1 with SMTP id gb1so202108292wic.1 for ; Tue, 13 Oct 2015 12:20:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=NDDwIKkfRjRg3J7LRTtPq3MGC0dpZAEFPj2wEUpxMkM=; b=PmXYCM8//wnmfg0iPBaIqjDuXdNKZ1JM8TIdVPi0WwFhebvGGR4V3h+Wz/Wmmh1aVi U6f7WfEzmvXmTP0eBX64iAk3spI3w5+kJh4ajj5Ihb/KPXnZfG6TbltMztNiS7K2WPVb dub1rBxpAbbIkXoB67cWhb28ESjMrhbNuaDVudyFh4cPHhhsIY5y1IyrZo2NPKm9sStc ZLz6hzyhGJ+9hRmN0jkGsJixbRpUmiKnC6xd6Q+KxHLcbmLro+H0tcuBFxtuFx9FEpvq SCzGsRCR9rEglM6qZh9FD5Dr3yHvjbnVphGypq63WPY0YIcSK8JOK2Hr1sTnhLudsLv/ xk8w== X-Received: by 10.195.18.8 with SMTP id gi8mr17385398wjd.111.1444764021915; Tue, 13 Oct 2015 12:20:21 -0700 (PDT) Original-Received: from localhost ([188.245.89.233]) by smtp.gmail.com with ESMTPSA id lb10sm5415038wjc.9.2015.10.13.12.20.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Oct 2015 12:20:20 -0700 (PDT) In-Reply-To: (Javier's message of "Tue, 13 Oct 2015 18:19:36 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::236 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:107617 Archived-At: Javier writes: > 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? > I use Gnome 3 desktop environment, which heavily relies on Super key as modifier. My xmodmap -pm out put is as follow $ xmodmap -pm xmodmap: up to 4 keys per modifier, (keycodes in parentheses): shift Shift_L (0x32), Shift_R (0x3e) lock Caps_Lock (0x42) control Control_L (0x25), Control_R (0x69) mod1 Alt_L (0x40), Meta_L (0xcd) mod2 Num_Lock (0x4d) mod3 mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf) mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb) so I think I prefer to map it to hyper and remove so I have to remove it from mod4 keymap and set it to mod5 beside AltGr. I'm no aware of any usage for hyper key in my current workflow. > 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. I didn't know that it is possible, can you explain more? is it completely isolate my Emacs frame from other windows? and both environments can run simultaneously? > > 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-???. > An let me ask a meta question, don't you think of it as a unresolved bug? AltGr works as defacto standard (or even constituted standard, I don't know for sure) for 3rd and forth level shift characters, while Emacs uses bindings to extinct keys like hyper and Meta and even knows about things like Pause/Break, why it doesn't support this key? Do you think I should report it as a bug? (or is it reported?) And one of the reasons I sent this email (beside my own problem) was that I wanted to know if anybody else suffers from this shortcoming?