unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Pascal J. Bourguignon" <pjb@informatimago.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Trouble binding Alt *by itself* to the execute-extended-command...(Alt-x and ESC-x work fine.)
Date: Sun, 07 Jul 2013 00:16:46 +0200	[thread overview]
Message-ID: <877gh3wcz5.fsf@informatimago.com> (raw)
In-Reply-To: 6a969c8d-e606-4143-afd1-83ee32c82aeb@googlegroups.com

Chris Seberino <cseberino@gmail.com> writes:

> Alt-x invokes the execute-extended-command just fine.

Did you do something special?  Because in my emacs, A-x doesn't invoke
execut-extended-command.  I have to type M-x to get that.


> I'd like the Alt key *by itself* to this command.
>
> I'm on Ubuntu 12.04.  I've read a few docs on X Windows, xmodmap, xev,
> Ubuntu Unity 3D but *still* can't seem to make this work.

You can find interesting keysyms in /usr/include/X11/keysymdef.h
You can use xmodmap to bind keycodes to the keysyms you want.
And you can use global-set-key to bind keysyms to the functions you want.

To replace the keysym Alt_L and Alt_R by Execute you can evaluate:

(shell-command "for code in $(xmodmap -pke|awk '/= Alt/{print $2}') ; do
xmodmap -e 'keycode 133 = Execute' ; done")

There is already a binding from the Execute keysym to
execute-extended-command in emacs-version "24.2.1"
If not, you can bind it with:

(global-set-key (kbd "<Execute>") 'execute-extended-command)


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.  
You know you've been lisping too long when you see a recent picture of George 
Lucas and think "Wait, I thought John McCarthy was dead!" -- Dalek_Baldwin




  reply	other threads:[~2013-07-06 22:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-06 21:18 Trouble binding Alt *by itself* to the execute-extended-command...(Alt-x and ESC-x work fine.) Chris Seberino
2013-07-06 22:16 ` Pascal J. Bourguignon [this message]
2013-07-06 22:21 ` Peter Dyballa
2013-07-07  2:44 ` Bob Proulx
2013-07-07  3:49 ` Yuri Khan
2013-07-07  5:08 ` Chris Seberino
2013-07-07 12:24   ` Raffaele Ricciardi
2013-07-07 12:51   ` Pascal J. Bourguignon
2013-07-07 20:50     ` Chris Seberino
2013-07-07 22:06       ` Pascal J. Bourguignon
     [not found] ` <mailman.469.1373165078.12400.help-gnu-emacs@gnu.org>
2013-07-07 12:49   ` Pascal J. Bourguignon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877gh3wcz5.fsf@informatimago.com \
    --to=pjb@informatimago.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).