unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* key binding doesn't work under consle mode
@ 2006-03-27 14:17 kid kid
  2006-03-28 18:21 ` Kevin Rodgers
  0 siblings, 1 reply; 4+ messages in thread
From: kid kid @ 2006-03-27 14:17 UTC (permalink / raw)


Hello!
   I have problem using Emacs. I use some key binding defined in my
dot emacs file:

(global-set-key "\C-h" 'delete-backward-char)
(define-key global-map "\M-h" 'backward-kill-word)
(define-key global-map [C-return] 'set-mark-command)

It works perfectly in emacs, but when I run "emacs -nw",
 I can type C-h to backword delete a char, type M-h to
 backward kill a word, but I can't use C-return to set mark.
 However, I use M-x describe-function <return> set-mark-command,
it says "It is bound to C-@, <C-return>, C-SPC.". But when I
type C-return, it just start a new line. I tried in the rxvt terminal
simulator or in real console(use Alt+Ctrl+F1), it doesn't work.

And I have another problem: when in real console(I mean switched
by typing Alt+Ctrl+F1~6), I can't use Alt key. When I want to type
M-x help, I must type ESC, then release it, then type x, then help.
Why doesn't the Alt key working in real console? Is it the fault of
wrongly configured emacs or the console?

                     Thank you!
                   pluskid

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

* Re: key binding doesn't work under consle mode
  2006-03-27 14:17 kid kid
@ 2006-03-28 18:21 ` Kevin Rodgers
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2006-03-28 18:21 UTC (permalink / raw)


kid kid wrote:
>    I have problem using Emacs. I use some key binding defined in my
> dot emacs file:
> 
> (global-set-key "\C-h" 'delete-backward-char)
> (define-key global-map "\M-h" 'backward-kill-word)
> (define-key global-map [C-return] 'set-mark-command)
> 
> It works perfectly in emacs, but when I run "emacs -nw",
>  I can type C-h to backword delete a char, type M-h to
>  backward kill a word, but I can't use C-return to set mark.
>  However, I use M-x describe-function <return> set-mark-command,
> it says "It is bound to C-@, <C-return>, C-SPC.". But when I
> type C-return, it just start a new line. I tried in the rxvt terminal
> simulator or in real console(use Alt+Ctrl+F1), it doesn't work.

I suspect rxvt and the console send the same key for RET and C-RET.
You can confirm that with `C-h k RET' then `C-h l' and `C-h k C-RET'
then `C-h l'.

-- 
Kevin Rodgers

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

* Re: key binding doesn't work under consle mode
       [not found] <mailman.33.1143487345.2481.help-gnu-emacs@gnu.org>
@ 2006-03-29  5:25 ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2006-03-29  5:25 UTC (permalink / raw)


> (global-set-key "\C-h" 'delete-backward-char)
> (define-key global-map "\M-h" 'backward-kill-word)
> (define-key global-map [C-return] 'set-mark-command)

Most text terminals have no such thing as a `return' key, only a RET key
which is really just another name for C-m.  So when you think you hit
C-return, Emacs really receives "C-C-m" aka "C-m".


        Stefan

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

* Re: key binding doesn't work under consle mode
@ 2006-03-29 10:31 kid kid
  0 siblings, 0 replies; 4+ messages in thread
From: kid kid @ 2006-03-29 10:31 UTC (permalink / raw)
  Cc: help-gnu-emacs


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

Yes, after following your instructions, I found the console and the rxvt
terminal do send only <return> key to emacs when I type the C-return, so
does the konsole terminal. But I wonder may I be able to change this strange
behavior of the terminal.

[-- Attachment #1.2: Type: text/html, Size: 262 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] 4+ messages in thread

end of thread, other threads:[~2006-03-29 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.33.1143487345.2481.help-gnu-emacs@gnu.org>
2006-03-29  5:25 ` key binding doesn't work under consle mode Stefan Monnier
2006-03-29 10:31 kid kid
  -- strict thread matches above, loose matches on Subject: below --
2006-03-27 14:17 kid kid
2006-03-28 18:21 ` Kevin Rodgers

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