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

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

Re: Any way to get a super modifier on Ubuntu?


From: Tim X
Subject: Re: Any way to get a super modifier on Ubuntu?
Date: Fri, 21 Jan 2011 08:46:30 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Sean McAfee <eefacm@gmail.com> writes:

> I recently started using Emacs on Ubuntu, and am having trouble getting
> my usual configuration working.
>
> I have a number of commands bound to a key combination involving the
> super modifier.  I'd like to associate this modifier with the
> "windows" key on my Dell keyboard.  When I open the Ubuntu Keyboard
> Preferences window, my choices under "Alt/Win key behavior are":
>
> * Default
> * Add the standard behavior to the Menu key
> * Alt and Meta are on Alt keys
> * Alt is mapped to Right Win, Super to Menu
> * Control is mapped to Alt keys, Alt is mapped to Win keys (*)
> * Control is mapped to Win keys (and the usual Ctrl keys) (*)
> * Hyper is mapped to Win-keys
> * Left Alt is swapped with Left Win (*)
> * Meta is mapped to Left Win
> * Meta is mapped to Win keys
>
> Except for the items marked with a (*), Ubuntu continues to intercept at
> least some key combinations involving the windows key.  For example,
> windows-w causes all of the onscreen windows to be shrunken and tiled.
> super-w is one of my Emacs chords, so only the starred items are
> possibly appropriate.  Unfortunately, none of them gives me a super
> key.
>
> The "Hyper is mapped to Win-keys" is the best option I've found so
> far, in that the windows key is associated with Emacs's hyper
> modifier.  It's a pain to have to change all my chords from super to
> hyper, but it might be tolerable if some chords were not still
> being intercepted by Ubuntu.
>
> Ideally, I'd like the left windows key to do nothing except be Emacs's
> super modifier, at least when the Emacs window has focus.  The right
> windows key could still retain its special Ubuntu functionality,
> should I ever want to start using it.
>
> Is there any way to get the behavior I want?  In the past I've
> sometimes twiddled X using xmodmap et al. in situations like this, but
> my impression is that techniques like that don't work well with modern
> window managers, which like to assume all such responsibilities for
> themselves.

>From your description, it sounds like you need to look into the gnome
keyboard shortcuts. 

Remember that gnome will 'grab' and 'consume' any shortcut key *before*
emacs ever sees it. So, if you want a key combination to be seen by
emacs, it must not be used in any of the gnome shortcut definitions. 

One of the first things I do when using gnome is to go through the
keyboard shortcuts and undefine or redefine any of them that are using
key chords I want to use for emacs. The other thing to ensure is that
you have the right keyboard definition. Gnome will only allow you to
modify keyboard mappings if it believes you have those keys. The xev
command can also be very useful in debugging by showing what X is seeing
when you hit a key etc.

Tim
-- 
tcross (at) rapttech dot com dot au


reply via email to

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