all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Peter Valdemar Mørch" <peter@morch.com>
To: help-gnu-emacs@gnu.org
Subject: C-Home, C-End doesn't work in gnome-terminal - any idea why?
Date: Fri, 23 Oct 2009 09:31:44 +0200	[thread overview]
Message-ID: <4AE15BE0.5000604@morch.com> (raw)

I don't seem to be able to generate C-home,C-end keyboard sequences from
a gnome-terminal.

Anybody have any idea why? Or how to tweek either emacs or
gnome-terminal to make it behave right? I realize this may be a gnome
issue, but then please let me know that if you know that for sure. I
decided to start here.

To reproduce:

* Start "emacs -nw" in a gnome-terminal
* Type : C-h c C-home

Expected output:
<C-home> runs the command beginning-of-buffer

Actual output:
<home> runs the command move-beginning-of-line

(pretty much the same for C-end too)

If I omit the -nw parameter, so emacs opens in a separate X window or if
I run it from an xterm instead of gnome-terminal, it also works.

Using the short perl snippet below, xterm produces this output when I
hit C-home:
  Decimal: 27    Hex: 1b
  Decimal: 91    Hex: 5b
  Decimal: 49    Hex: 31
  Decimal: 59    Hex: 3b
  Decimal: 53    Hex: 35
  Decimal: 72    Hex: 48

While gnome terminal produces this output:
  Decimal: 27	Hex: 1b
  Decimal: 79	Hex: 4f
  Decimal: 72	Hex: 48

Clearly this is different. Is that enough to point the finger at
gnome-terminal? Or is there a 'take-foobar-into-account' setting
somewhere in either emacs, terminals, xmodmap or other voodoo?

I've used stty to produce the same settings for both terminals - no dice
   - they still behave differently.

But I sometimes have to use emacs over a slow terminal, and I like to
use gnome-terminals. Yes, I know I can use M-< and M->, but C-home is in
my fingers from the X version. I hope I can get C-home, C-end to work! :-)

Thanks for reading this far.

Sincerely,

Peter

Perl snippet to see keyboard "chars":

#!/usr/bin/perl -w

use Term::ReadKey;
ReadMode('cbreak');
print "Press keys to see their ASCII values.  Use Ctrl-C to quit.\n";

while (1) {
     $char = ReadKey(0);
     last unless defined $char;
     printf(" Decimal: %d\tHex: %x\n", ord($char), ord($char));
}

ReadMode('normal');

-- 
Peter Valdemar Mørch
http://www.morch.com





             reply	other threads:[~2009-10-23  7:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-23  7:31 Peter Valdemar Mørch [this message]
2009-10-23 15:21 ` C-Home, C-End doesn't work in gnome-terminal - any idea why? Peter Dyballa
2009-10-23 19:39   ` "Peter Valdemar Mørch (Lists)"
2009-10-24  6:00 ` tomas
2009-10-24 10:33   ` "Peter Valdemar Mørch (Lists)"
2009-10-26 13:36     ` tomas
     [not found]     ` <mailman.9494.1256563986.2239.help-gnu-emacs@gnu.org>
2009-10-26 21:09       ` dickey
     [not found] <mailman.9325.1256309732.2239.help-gnu-emacs@gnu.org>
2016-08-17  6:40 ` pmorch
  -- strict thread matches above, loose matches on Subject: below --
2009-10-22  9:59 "Peter Valdemar Mørch (Lists)"
2009-10-26  9:47 ` "Peter Valdemar Mørch (Lists)"

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AE15BE0.5000604@morch.com \
    --to=peter@morch.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.