unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* rebinding ESC key
@ 2007-11-06  8:48 Mike Mattie
  2007-11-06 10:25 ` Peter Dyballa
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Mattie @ 2007-11-06  8:48 UTC (permalink / raw)
  To: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 545 bytes --]

Hello,

I would like to rebind the ESC key to execute a single function on a key-press. A simple mapping like this:

(global-set-key kdb("<ESC>") 'execute-extended-command)

I found that when I successfully bound the key that many of the essential bindings such as "M-" were broken.
I am assuming that M- is some sort of alias to ESC for compatibility. (which has been handy on weird terminals
such as screen). 

How do I map the ESC key without altering M- bindings ?

sorry if this is a FAQ, I did google.

Cheers,
Mike Mattie

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: rebinding ESC key
  2007-11-06  8:48 rebinding ESC key Mike Mattie
@ 2007-11-06 10:25 ` Peter Dyballa
  2007-11-07  7:40   ` Kevin Rodgers
       [not found]   ` <mailman.3078.1194421225.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Dyballa @ 2007-11-06 10:25 UTC (permalink / raw)
  To: Mike Mattie; +Cc: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 567 bytes --]


Am 06.11.2007 um 09:48 schrieb Mike Mattie:

> How do I map the ESC key without altering M- bindings ?

Using C-ESC? Is there no other key available like PtSc, ScLk, SysRq,  
Brk, ...?

The Esc and the Meta keys are somehow related to each-other. If a  
keyboard has no functioning Meta key, then pressing Esc and then key  
that would have been pressed together with the Meta key result to the  
same event in GNU Emacs.

--
Greetings

   Pete

Build a man a fire and he'll be warm for a night, but set a man on  
fire and he'll be warm for the rest of his life.



[-- Attachment #1.2: Signierter Teil der Nachricht --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: rebinding ESC key
  2007-11-06 10:25 ` Peter Dyballa
@ 2007-11-07  7:40   ` Kevin Rodgers
  2007-11-07 13:35     ` Mike Mattie
       [not found]   ` <mailman.3078.1194421225.18990.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Kevin Rodgers @ 2007-11-07  7:40 UTC (permalink / raw)
  To: help-gnu-emacs

Peter Dyballa wrote:
> 
> Am 06.11.2007 um 09:48 schrieb Mike Mattie:
> 
>> How do I map the ESC key without altering M- bindings ?
> 
> Using C-ESC? Is there no other key available like PtSc, ScLk, SysRq, 
> Brk, ...?
> 
> The Esc and the Meta keys are somehow related to each-other. If a 
> keyboard has no functioning Meta key, then pressing Esc and then key 
> that would have been pressed together with the Meta key result to the 
> same event in GNU Emacs.

You might try setting meta-prefix-char to a character other than ESC,
perhaps a character you can't even type on your keyboard.  Then bind
that character to the ESC-prefix symbol.

-- 
Kevin Rodgers
Denver, Colorado, USA

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

* Re: rebinding ESC key
  2007-11-07  7:40   ` Kevin Rodgers
@ 2007-11-07 13:35     ` Mike Mattie
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Mattie @ 2007-11-07 13:35 UTC (permalink / raw)
  To: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 816 bytes --]

On Wed, 07 Nov 2007 00:40:03 -0700
Kevin Rodgers <kevin.d.rodgers@gmail.com> wrote:

> Peter Dyballa wrote:
> > 
> > Am 06.11.2007 um 09:48 schrieb Mike Mattie:
> > 
> >> How do I map the ESC key without altering M- bindings ?
> > 
> > Using C-ESC? Is there no other key available like PtSc, ScLk,
> > SysRq, Brk, ...?
> > 
> > The Esc and the Meta keys are somehow related to each-other. If a 
> > keyboard has no functioning Meta key, then pressing Esc and then
> > key that would have been pressed together with the Meta key result
> > to the same event in GNU Emacs.
> 
> You might try setting meta-prefix-char to a character other than ESC,
> perhaps a character you can't even type on your keyboard.  Then bind
> that character to the ESC-prefix symbol.
> 

excellent ! I will try that.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: rebinding ESC key
       [not found] <mailman.3032.1194339074.18990.help-gnu-emacs@gnu.org>
@ 2007-11-07 19:06 ` Johan Bockgård
  0 siblings, 0 replies; 8+ messages in thread
From: Johan Bockgård @ 2007-11-07 19:06 UTC (permalink / raw)
  To: help-gnu-emacs

Mike Mattie <codermattie@gmail.com> writes:

> How do I map the ESC key without altering M- bindings ?

Bind the <escape> function key.

-- 
Johan Bockgård

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

* Re: rebinding ESC key
       [not found]   ` <mailman.3078.1194421225.18990.help-gnu-emacs@gnu.org>
@ 2007-11-10 20:13     ` don provan
  2007-11-10 21:05       ` Amy Templeton
  0 siblings, 1 reply; 8+ messages in thread
From: don provan @ 2007-11-10 20:13 UTC (permalink / raw)
  To: help-gnu-emacs

Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:

> You might try setting meta-prefix-char to a character other than ESC,
> perhaps a character you can't even type on your keyboard.  Then bind
> that character to the ESC-prefix symbol.

To this day, I occasionally find myself running emacs on systems or
over communications paths where the META key doesn't work, so I have
to fall back to ESC-] or whatever. Am I the only one that still
encounters such klunky environments? Or am I just the only one old
enough to think about using ESC because I grew up with it as the only
option?
-don provan

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

* Re: rebinding ESC key
  2007-11-10 20:13     ` don provan
@ 2007-11-10 21:05       ` Amy Templeton
  2007-11-11 10:50         ` B. Smith-Mannschott
  0 siblings, 1 reply; 8+ messages in thread
From: Amy Templeton @ 2007-11-10 21:05 UTC (permalink / raw)
  To: help-gnu-emacs

don provan <dprovan@comcast.net> wrote:
> To this day, I occasionally find myself running emacs on systems or
> over communications paths where the META key doesn't work, so I have
> to fall back to ESC-] or whatever. Am I the only one that still
> encounters such klunky environments? Or am I just the only one old
> enough to think about using ESC because I grew up with it as the only
> option?

I didn't grow up with it as the only option (I started using Emacs a
couple of years ago), but it has on occasion come in handy--for example,
on my school's Macs (which are the closest thing they have to a usable
computer) they do have Emacs installed--but it's version 21.3 (not even
21.4!), with no graphical support, and there's no working ALT/META key,
so I have to settle for ESC. As a rule, I just try not to use the school
computers.

So no, you're not the only one who finds ESC useful on occasion :-).

Amy

-- 
I'd give my right arm to be ambidextrous.

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

* Re: rebinding ESC key
  2007-11-10 21:05       ` Amy Templeton
@ 2007-11-11 10:50         ` B. Smith-Mannschott
  0 siblings, 0 replies; 8+ messages in thread
From: B. Smith-Mannschott @ 2007-11-11 10:50 UTC (permalink / raw)
  To: Amy Templeton; +Cc: help-gnu-emacs


On Nov 10, 2007, at 22:05, Amy Templeton wrote:

> I didn't grow up with it as the only option (I started using Emacs a
> couple of years ago), but it has on occasion come in handy--for  
> example,
> on my school's Macs (which are the closest thing they have to a usable
> computer) they do have Emacs installed--but it's version 21.3 (not  
> even
> 21.4!), with no graphical support, and there's no working ALT/META  
> key,
> so I have to settle for ESC. As a rule, I just try not to use the  
> school
> computers.

Mac OS X's Terminal.app provides a setting "Use option as meta key" as  
far back as I can remember.

This means that you can't use Mac OS option key combinations to type  
foreign characters but you can still insert them in emacs using an  
appropriate emacs input-method (I use rfc1345).

// Ben Smith-Mannschott

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

end of thread, other threads:[~2007-11-11 10:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-06  8:48 rebinding ESC key Mike Mattie
2007-11-06 10:25 ` Peter Dyballa
2007-11-07  7:40   ` Kevin Rodgers
2007-11-07 13:35     ` Mike Mattie
     [not found]   ` <mailman.3078.1194421225.18990.help-gnu-emacs@gnu.org>
2007-11-10 20:13     ` don provan
2007-11-10 21:05       ` Amy Templeton
2007-11-11 10:50         ` B. Smith-Mannschott
     [not found] <mailman.3032.1194339074.18990.help-gnu-emacs@gnu.org>
2007-11-07 19:06 ` Johan Bockgård

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).