* Meta-key Madness (argh!!)
@ 2006-11-30 6:12 Howard Yeh!
2006-11-30 7:25 ` Eric Hanchrow
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Howard Yeh! @ 2006-11-30 6:12 UTC (permalink / raw)
Hi,
I can't figure out how to bind "C-["
For some reason
(global-set-key "\C-[" 'insert-parentheses)
unbinds all my meta keys, and pressing "C-[" gives me the ESC key. What
gives?
I also has trouble binding c-i, m-i, because they are synonyms for
<TAB>. Though I have really ugly work around for them. Is there any
established way to deal with this sort of problems?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Meta-key Madness (argh!!)
2006-11-30 6:12 Meta-key Madness (argh!!) Howard Yeh!
@ 2006-11-30 7:25 ` Eric Hanchrow
2006-11-30 7:29 ` David Kastrup
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Eric Hanchrow @ 2006-11-30 7:25 UTC (permalink / raw)
>>>>> "Howard" == Howard Yeh! <hayeah@gmail.com> writes:
Howard> (global-set-key "\C-[" 'insert-parentheses)
Howard> unbinds all my meta keys, and pressing "C-[" gives me the
Howard> ESC key. What gives?
That's because you're using a text-mode console, as opposed to running
Emacs under X, or Microsoft Windows, or OS X.
In text-mode consoles, the keyboard is capable of delivering only
ASCII characters (or sequences of them) when you press a key, and in
ASCII, control-[ and ESC _are the same character_. They're
indistinguishable.
(They even do the same thing in my Windows Emacs, although there, I
suspect it might be possible to distinguish them, with some wizardry.)
Howard> I also has trouble binding c-i, m-i, because they are
Howard> synonyms for <TAB>.
Yup. Same deal.
Howard> Is there any established way to deal with this sort of
Howard> problems?
Other than "use a window system" (which as you can see isn't even
sufficient), I can't think of one.
--
Most people don't even know what a rootkit is, so why should they
care about it?
-- Thomas Hesse, Sony BMG's president of global digital business
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Meta-key Madness (argh!!)
2006-11-30 6:12 Meta-key Madness (argh!!) Howard Yeh!
2006-11-30 7:25 ` Eric Hanchrow
@ 2006-11-30 7:29 ` David Kastrup
2006-12-02 21:24 ` Howard Yeh!
[not found] ` <mailman.1344.1164872317.2155.help-gnu-emacs@gnu.org>
2006-12-02 21:26 ` Howard Yeh!
3 siblings, 1 reply; 9+ messages in thread
From: David Kastrup @ 2006-11-30 7:29 UTC (permalink / raw)
"Howard Yeh!" <hayeah@gmail.com> writes:
> I can't figure out how to bind "C-["
>
> For some reason
>
> (global-set-key "\C-[" 'insert-parentheses)
>
> unbinds all my meta keys, and pressing "C-[" gives me the ESC key. What
> gives?
That's how things are on text terminals. On graphical terminals,
(local-set-key [C-\[] 'insert-parentheses)
could conceivably make a difference, but apparently it doesn't.
> I also has trouble binding c-i, m-i, because they are synonyms for
> <TAB>. Though I have really ugly work around for them. Is there any
> established way to deal with this sort of problems?
Accept that ESC is the same as C-[.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Meta-key Madness (argh!!)
2006-11-30 7:29 ` David Kastrup
@ 2006-12-02 21:24 ` Howard Yeh!
0 siblings, 0 replies; 9+ messages in thread
From: Howard Yeh! @ 2006-12-02 21:24 UTC (permalink / raw)
David Kastrup wrote:
> "Howard Yeh!" <hayeah@gmail.com> writes:
>
> > I can't figure out how to bind "C-["
> >
> > For some reason
> >
> > (global-set-key "\C-[" 'insert-parentheses)
> >
> > unbinds all my meta keys, and pressing "C-[" gives me the ESC key. What
> > gives?
>
> That's how things are on text terminals. On graphical terminals,
> (local-set-key [C-\[] 'insert-parentheses)
> could conceivably make a difference, but apparently it doesn't.
You mean emacs still can't tell when used under a graphical terminal?
> > I also has trouble binding c-i, m-i, because they are synonyms for
> > <TAB>. Though I have really ugly work around for them. Is there any
> > established way to deal with this sort of problems?
>
> Accept that ESC is the same as C-[.
I remapped c-i to c-> in emacs, and bind the function i want to c->. So
emacs *can* tell apart c-i and <tab>. But simply binding to c-i doesn't
work as advertised.
Strangely, it works to bind C-[ in my lisp-mode.
I am anal retentive about my key bindings... This is not the first
time I've struggled with bindings to control key synonyms.
I absolutely need C-i because I bind my arrow keys to C-i,j,k,l.
This is so my hand doesn't have to move as much. The default
emacs bindings are not very ergonomic.
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.1344.1164872317.2155.help-gnu-emacs@gnu.org>]
* Re: Meta-key Madness (argh!!)
[not found] ` <mailman.1344.1164872317.2155.help-gnu-emacs@gnu.org>
@ 2006-12-02 21:15 ` Howard Yeh!
0 siblings, 0 replies; 9+ messages in thread
From: Howard Yeh! @ 2006-12-02 21:15 UTC (permalink / raw)
Eric Hanchrow wrote:
> >>>>> "Howard" == Howard Yeh! <hayeah@gmail.com> writes:
>
> Howard> (global-set-key "\C-[" 'insert-parentheses)
>
> Howard> unbinds all my meta keys, and pressing "C-[" gives me the
> Howard> ESC key. What gives?
>
> That's because you're using a text-mode console, as opposed to running
> Emacs under X, or Microsoft Windows, or OS X.
>
I am using emacs under X.
And that's the truly bizarre thing is, C-[ works in my lisp mode
keymap.
(define-key slime-mode-map (kbd "C-[") 'insert-parentheses)
Works perfect.
> (They even do the same thing in my Windows Emacs, although there, I
> suspect it might be possible to distinguish them, with some wizardry.)
Oh, man. I tried so hard (in X). It's totally confusing.
> Other than "use a window system" (which as you can see isn't even
> sufficient), I can't think of one.
Use a window system is NOT sufficient...
Do you know if X-emacs better for key bindings?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Meta-key Madness (argh!!)
2006-11-30 6:12 Meta-key Madness (argh!!) Howard Yeh!
` (2 preceding siblings ...)
[not found] ` <mailman.1344.1164872317.2155.help-gnu-emacs@gnu.org>
@ 2006-12-02 21:26 ` Howard Yeh!
2006-12-02 22:12 ` David Kastrup
2006-12-04 15:06 ` Johan Bockgård
3 siblings, 2 replies; 9+ messages in thread
From: Howard Yeh! @ 2006-12-02 21:26 UTC (permalink / raw)
On the same tune, is it possible to dissociate ESC from meta?
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-12-04 15:06 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-30 6:12 Meta-key Madness (argh!!) Howard Yeh!
2006-11-30 7:25 ` Eric Hanchrow
2006-11-30 7:29 ` David Kastrup
2006-12-02 21:24 ` Howard Yeh!
[not found] ` <mailman.1344.1164872317.2155.help-gnu-emacs@gnu.org>
2006-12-02 21:15 ` Howard Yeh!
2006-12-02 21:26 ` Howard Yeh!
2006-12-02 22:12 ` David Kastrup
2006-12-03 3:06 ` Howard Yeh!
2006-12-04 15:06 ` Johan Bockgård
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.