all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Remapping Control-[
@ 2006-02-02 20:57 Tim Johnson
  2006-02-02 23:40 ` Kevin Rodgers
  2006-02-02 23:53 ` François Gannaz
  0 siblings, 2 replies; 7+ messages in thread
From: Tim Johnson @ 2006-02-02 20:57 UTC (permalink / raw)


Howdy:

I use linux. On my machine, emacs interprets Control-[
as ESC. Is is possible to ovveride this feature?

Thanks
Tim

-- 
Tim Johnson <tim@johnsons-web.com>
      http://www.alaska-internet-solutions.com

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

* Re: Remapping Control-[
  2006-02-02 20:57 Remapping Control-[ Tim Johnson
@ 2006-02-02 23:40 ` Kevin Rodgers
  2006-02-03  0:58   ` Tim Johnson
  2006-02-02 23:53 ` François Gannaz
  1 sibling, 1 reply; 7+ messages in thread
From: Kevin Rodgers @ 2006-02-02 23:40 UTC (permalink / raw)


Tim Johnson wrote:
> I use linux. On my machine, emacs interprets Control-[
> as ESC. Is is possible to ovveride this feature?

Doesn't every program interpret C-[ as ESC?

Anyway, how about telling us what platform you're running on
and whether emacs is running on the console, in a terminal
window, or in its own window.

-- 
Kevin Rodgers

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

* Re: Remapping Control-[
  2006-02-02 20:57 Remapping Control-[ Tim Johnson
  2006-02-02 23:40 ` Kevin Rodgers
@ 2006-02-02 23:53 ` François Gannaz
  2006-02-03  1:06   ` Tim Johnson
  2006-02-03 16:44   ` Kevin Rodgers
  1 sibling, 2 replies; 7+ messages in thread
From: François Gannaz @ 2006-02-02 23:53 UTC (permalink / raw)


Le jeu 02 fév 11:57, Tim Johnson a écrit :
> Howdy:
> 
> I use linux. On my machine, emacs interprets Control-[
> as ESC. Is is possible to ovveride this feature?

This would make Control-[ behave as Control-h :
(keyboard-translate ?\C-\[ ?\C-h)

Hope it helps.
--
François

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

* Re: Remapping Control-[
  2006-02-02 23:40 ` Kevin Rodgers
@ 2006-02-03  0:58   ` Tim Johnson
  0 siblings, 0 replies; 7+ messages in thread
From: Tim Johnson @ 2006-02-03  0:58 UTC (permalink / raw)


* Kevin Rodgers <ihs_4664@yahoo.com> [060202 14:54]:
> Tim Johnson wrote:
> >I use linux. On my machine, emacs interprets Control-[
> >as ESC. Is is possible to ovveride this feature?
> 
> Doesn't every program interpret C-[ as ESC?
 
  Not on my machine :-)
  Hadn't really thought about before, tho', so did some
    checking
  Examples: vim interprets C-[, which is a good
              thing - 'cuz it's easier to reach than ESC. 
            Midnight Commander: If ESC-ESC, such as aborting
              a popup feature is expected C-[ - C-[ does not abort the
              feature. If ESC-TAB is expected, then C-[ - ESC does
              the same.
            Firefox recognizes C-[, C-]
            Konsole and gnome-terminal appear to see C-[
              as ESC

> Anyway, how about telling us what platform you're running on
> and whether emacs is running on the console, in a terminal
> window, or in its own window.

  Red Hat 9.0 2.4.20-20.9
  Running in its own window. Using X, window manager is KDE
  Thanks
  Tim
-- 
Tim Johnson <tim@johnsons-web.com>
      http://www.alaska-internet-solutions.com

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

* Re: Remapping Control-[
  2006-02-02 23:53 ` François Gannaz
@ 2006-02-03  1:06   ` Tim Johnson
  2006-02-03 16:44   ` Kevin Rodgers
  1 sibling, 0 replies; 7+ messages in thread
From: Tim Johnson @ 2006-02-03  1:06 UTC (permalink / raw)


* François Gannaz <mytskine@laposte.net> [060202 15:06]:
> Le jeu 02 fév 11:57, Tim Johnson a écrit :
> > Howdy:
> > 
> > I use linux. On my machine, emacs interprets Control-[
> > as ESC. Is is possible to ovveride this feature?
> 
> This would make Control-[ behave as Control-h :
> (keyboard-translate ?\C-\[ ?\C-h)
 
  Hey! Ask one question, get two answered. Cool! I could
  then remap it to C-< or C->, both of which are awkward.
  Then it becomes a very accessible prefix key.

> Hope it helps.

  Thanks!
  tj

-- 
Tim Johnson <tim@johnsons-web.com>
      http://www.alaska-internet-solutions.com

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

* Re: Remapping Control-[
  2006-02-02 23:53 ` François Gannaz
  2006-02-03  1:06   ` Tim Johnson
@ 2006-02-03 16:44   ` Kevin Rodgers
  2006-02-03 21:06     ` François Gannaz
  1 sibling, 1 reply; 7+ messages in thread
From: Kevin Rodgers @ 2006-02-03 16:44 UTC (permalink / raw)


François Gannaz wrote:
> Le jeu 02 fév 11:57, Tim Johnson a écrit :
> 
>>Howdy:
>>
>>I use linux. On my machine, emacs interprets Control-[
>>as ESC. Is is possible to ovveride this feature?
> 
> 
> This would make Control-[ behave as Control-h :
> (keyboard-translate ?\C-\[ ?\C-h)

In Emacs 21.4 on Solaris, that signals an error:

Lisp error: (void-variable \[)

But in any case, wouldn't that keyboard translation also force Emacs to
interpret ESC as Control-h, because:

(= (aref "\C-[" 0) ?\e) => t

-- 
Kevin Rodgers

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

* Re: Remapping Control-[
  2006-02-03 16:44   ` Kevin Rodgers
@ 2006-02-03 21:06     ` François Gannaz
  0 siblings, 0 replies; 7+ messages in thread
From: François Gannaz @ 2006-02-03 21:06 UTC (permalink / raw)


Le ven 03 fév 09:44, Kevin Rodgers a écrit :
> François Gannaz wrote:
> >Le jeu 02 fév 11:57, Tim Johnson a écrit :
> >
> >>Howdy:
> >>
> >>I use linux. On my machine, emacs interprets Control-[
> >>as ESC. Is is possible to ovveride this feature?
> >
> >
> >This would make Control-[ behave as Control-h :
> >(keyboard-translate ?\C-\[ ?\C-h)
> 
> In Emacs 21.4 on Solaris, that signals an error:
> 
> Lisp error: (void-variable \[)
> 
> But in any case, wouldn't that keyboard translation also force Emacs to
> interpret ESC as Control-h, because:
> 
> (= (aref "\C-[" 0) ?\e) => t

I'm not really sure how it should behave. In X.org on Linux, the two of
them behave differently after this keyboard-translate. In a terminal, it
changes the ESC behaviour. And I don't know what would happen with
Windows.

So on a X session of Emacs, this should translate C-[ to a key. Then
it's up to you to assign this key to any function, keeping ESC
unchanged.

The Emacs manual has an info node "Named ASCII Control Characters", but
I couldn't make anything out of it :

|    <TAB>, <RET>, <BS>, <LFD>, <ESC> and <DEL> started out as names for
| certain ASCII control characters, used so often that they have special
| keys of their own.  Later, users found it convenient to distinguish in
| Emacs between these keys and the "same" control characters typed with
| the <CTRL> key.
|
|    Emacs distinguishes these two kinds of input, when the keyboard
| reports these keys to Emacs.  It treats the "special" keys as function
| keys named `tab', `return', `backspace', `linefeed', `escape', and
| `delete'.  These function keys translate automatically into the
| corresponding ASCII characters _if_ they have no bindings of their own.
| As a result, neither users nor Lisp programs need to pay attention to
| the distinction unless they care to.
|
|    If you do not want to distinguish between (for example) <TAB> and
| `C-i', make just one binding, for the ASCII character <TAB> (octal code
| 011).  If you do want to distinguish, make one binding for this ASCII
| character, and another for the "function key" `tab'.
|
|    With an ordinary ASCII terminal, there is no way to distinguish
| between <TAB> and `C-i' (and likewise for other such pairs), because
| the terminal sends the same character in both cases.

--
François Gannaz

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

end of thread, other threads:[~2006-02-03 21:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-02 20:57 Remapping Control-[ Tim Johnson
2006-02-02 23:40 ` Kevin Rodgers
2006-02-03  0:58   ` Tim Johnson
2006-02-02 23:53 ` François Gannaz
2006-02-03  1:06   ` Tim Johnson
2006-02-03 16:44   ` Kevin Rodgers
2006-02-03 21:06     ` François Gannaz

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.