help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using AltGr as standard modifier key in emacs


From: Shahab Shahsavari Alavidjeh
Subject: Re: Using AltGr as standard modifier key in emacs
Date: Tue, 13 Oct 2015 22:50:17 +0330
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Javier <nospam@nospam.com> 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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]