all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Any way to get a super modifier on Ubuntu?
@ 2011-01-20 20:26 Sean McAfee
  2011-01-20 21:46 ` Tim X
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sean McAfee @ 2011-01-20 20:26 UTC (permalink / raw)
  To: help-gnu-emacs

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Any way to get a super modifier on Ubuntu?
  2011-01-20 20:26 Any way to get a super modifier on Ubuntu? Sean McAfee
@ 2011-01-20 21:46 ` Tim X
  2011-01-21  0:02 ` Rafael
  2011-01-21 10:02 ` Peter Dyballa
  2 siblings, 0 replies; 4+ messages in thread
From: Tim X @ 2011-01-20 21:46 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Any way to get a super modifier on Ubuntu?
  2011-01-20 20:26 Any way to get a super modifier on Ubuntu? Sean McAfee
  2011-01-20 21:46 ` Tim X
@ 2011-01-21  0:02 ` Rafael
  2011-01-21 10:02 ` Peter Dyballa
  2 siblings, 0 replies; 4+ messages in thread
From: Rafael @ 2011-01-21  0:02 UTC (permalink / raw)
  To: help-gnu-emacs

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":

In four different machines of different models, the left windows key
"just works" for me as super modifier, and I can use, for example:

(global-set-key [(super i)] 'org-toggle-inline-images)

> For example, windows-w causes all of the onscreen windows to be
> shrunken and tiled.

This is a Compiz keybinding, which you can modify using compiz-config
settings manager.

> The right windows key could still retain its special Ubuntu
> functionality, should I ever want to start using it.

When I press the right windows key in Emacs, I get the same as with
pressing Alt-x. I have not found a use for that, though.

Regards,


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Any way to get a super modifier on Ubuntu?
  2011-01-20 20:26 Any way to get a super modifier on Ubuntu? Sean McAfee
  2011-01-20 21:46 ` Tim X
  2011-01-21  0:02 ` Rafael
@ 2011-01-21 10:02 ` Peter Dyballa
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2011-01-21 10:02 UTC (permalink / raw)
  To: Sean McAfee; +Cc: help-gnu-emacs


Am 20.01.2011 um 21:26 schrieb Sean McAfee:

> Is there any way to get the behavior I want?


Try a different UNIX?

--
Greetings

   Pete

Competition is the great eroder of profits.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-21 10:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-20 20:26 Any way to get a super modifier on Ubuntu? Sean McAfee
2011-01-20 21:46 ` Tim X
2011-01-21  0:02 ` Rafael
2011-01-21 10:02 ` Peter Dyballa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.