unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* C-Home, C-End doesn't work in gnome-terminal - any idea why?
@ 2009-10-22  9:59 "Peter Valdemar Mørch (Lists)"
  2009-10-26  9:47 ` "Peter Valdemar Mørch (Lists)"
  0 siblings, 1 reply; 10+ messages in thread
From: "Peter Valdemar Mørch (Lists)" @ 2009-10-22  9:59 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 10+ messages in thread
* C-Home, C-End doesn't work in gnome-terminal - any idea why?
@ 2009-10-23  7:31 Peter Valdemar Mørch
  2009-10-23 15:21 ` Peter Dyballa
  2009-10-24  6:00 ` tomas
  0 siblings, 2 replies; 10+ messages in thread
From: Peter Valdemar Mørch @ 2009-10-23  7:31 UTC (permalink / raw)
  To: help-gnu-emacs

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





^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <mailman.9325.1256309732.2239.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2016-08-17  6:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-22  9:59 C-Home, C-End doesn't work in gnome-terminal - any idea why? "Peter Valdemar Mørch (Lists)"
2009-10-26  9:47 ` "Peter Valdemar Mørch (Lists)"
  -- strict thread matches above, loose matches on Subject: below --
2009-10-23  7:31 Peter Valdemar Mørch
2009-10-23 15:21 ` 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

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