Discussion:
(global-set-key [control-right] 'end-of-line)
(too old to reply)
Itamar
2006-05-04 18:58:06 UTC
Permalink
Hello,

I am trying to bind <control right arrow> to move the cursor to the end
of the line

I have inserted (global-set-key [control-right] 'end-of-line) into my
.emacs file but pressing the sequence does not work.

Can anyone tell me how to bind this correctly [on a mac, using Mac OS X
Terminal]?

Thanks!

Itamar
martin
2006-05-05 09:40:08 UTC
Permalink
"I" == Itamar <***@not.spam> writes:
I> Newsgroups: gnu.emacs
I> Date: Thu, 4 May 2006 14:58:06 -0400
I>
I> Hello,
I>
I> I am trying to bind <control right arrow> to move the cursor to the
I> end of the line
I>
I> I have inserted (global-set-key [control-right] 'end-of-line) into my
I> .emacs file but pressing the sequence does not work.
I>
I> Can anyone tell me how to bind this correctly [on a mac, using Mac OS
I> X Terminal]?
I>
I> Thanks!
I>
I> Itamar

Hi,

how about (global-set-key (quote [C-right]) (quote end-of-line)) ?

Martin
--
parozusa at web dot de
Itamar
2006-05-05 11:58:41 UTC
Permalink
Post by martin
I> Newsgroups: gnu.emacs
I> Date: Thu, 4 May 2006 14:58:06 -0400
I> I> Hello,
I> I> I am trying to bind <control right arrow> to move the cursor to the
I> end of the line
I> I> I have inserted (global-set-key [control-right] 'end-of-line) into my
I> .emacs file but pressing the sequence does not work.
I> I> Can anyone tell me how to bind this correctly [on a mac, using Mac OS
I> X Terminal]?
I> I> Thanks!
I> I> Itamar
Hi,
how about (global-set-key (quote [C-right]) (quote end-of-line)) ?
Martin
Martin,

None of these work:

(define-key global-map [(control-right)] 'end-of-line)
(global-set-key [control-right] 'end-of-line)
(global-set-key (quote [C-right]) (quote end-of-line))
(global-set-key [(control right)] 'end-of-line)

(global-set-key "\C-right" 'end-of-line) gives a syntax error (I get an
error while loading .emacs.)

Baffled,
Itamar
Kim F. Storm
2006-05-05 14:46:24 UTC
Permalink
Post by Itamar
(define-key global-map [(control-right)] 'end-of-line)
Remove the dash:

(define-key global-map [(control right)] 'end-of-line)
--
Kim F. Storm http://www.cua.dk
Itamar
2006-05-05 15:03:47 UTC
Permalink
Post by Kim F. Storm
Post by Itamar
(define-key global-map [(control-right)] 'end-of-line)
(define-key global-map [(control right)] 'end-of-line)
Thanks Kim,

Still no go.
It might have to do with Mac OS X's Terminal programs. I tried with
both Terminal and iTerm.
Does this work for you if you put it in your .emacs file? What platform
are you on?

Thanks
Itamar

Continue reading on narkive:
Loading...