Ticket #1938 (closed defect: invalid)

Opened 14 years ago

Last modified 12 years ago

ctrl-pgdn and ctrl-pgup key mappings broken in latest MC editor

Reported by: steevithak Owned by:
Priority: major Milestone:
Component: mc-core Version: version not selected
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

In the lastest version of MC being distributed by RedHat? for Fedora, the keymappings for the editor ctrl-pgdn and ctrl-pgup keys no longer work correctly.

On prior versions of MC it was possible to move immediately to the top or bottom of a large file by using, respectively, the ctrl-pgup or ctrl-pgdn key combos. In the latest version of MC, this key combo no longer works as it should. Instead it partially duplicates the functionality of the pgup and pgdn keys, moving only a single page of text instead of moving all the way to the beginning or end of the text in the file.

I've filed a bug in the RedHat? bugzilla but my impression is that this may be related to an intentional change in the MC code, so I'm filing the bug here as well.

For reference, here's a link the RedHat? Fedora bug:
https://bugzilla.redhat.com/show_bug.cgi?id=551062

This bug first appeared in the Fedora version of mc:

mc-4.7.0-0.6.pre4.20091221git.fc12.x86_64

and continues to be present in the latest Fedora version of mc:

mc-4.7.0.1-1.fc12.x86_64

Change History

comment:1 Changed 14 years ago by angel_il

On prior versions of MC it was possible to move immediately to the top or bottom of a large file by using,

try ctrl-home/ctrl-end

or put in your ~/.mc/mc.keymap

[editor]
EditBeginningOfText = ctrl-pgup; alt-lt
EditEndOfText = ctrl-pgdn; alt-gt
EditBeginPage = ctrl-home
EditEndPage = ctrl-end

comment:2 Changed 14 years ago by steevithak

That was suggested in reply to the RedHat? bug as well. The problem as far as I can tell is that none of the key bindings available in the keymap file offer a "go to end of the file" or "go to the beginning of file" function to connect a key combo to.

The current contents of my /etc/mc/mc.keymap file are:


[editor]
EditBeginningOfText = ctrl-home; alt-lt
EditEndOfText = ctrl-end; alt-gt
EditBeginPage = ctrl-pgup
EditEndPage = ctrl-pgdn

And here's what happens when I press those keys:

ctrl-home - moves the cursor to first character of the current line
ctrl-end - moves the cursor to the last character of the current line
ctrl-pgup - moves the cursor to the first line of the currently displayed page of text
ctrl-pgdn - moves the cursor to the last line of the currently displayed page of text

What I want is not a key combo to move the cursor to the last line of the current display page but to the last line of the file, which might be thousands of lines beyond the end of the current page.

The work-around you're suggesting reverses what these two key combos do but since neither does what the older version of MC did, this doesn't solve the problem.

If you look at any older version of MC, you can see what I mean. Load a very large (100s of lines) text file. Depending on how old the version is, either ctrl-pgdn or ctrl-end will take your cursor to the end of the file and ctrl-pgup or ctrl-home will take you to the first line of the file. But NEITHER key combo does this anymore.

comment:3 Changed 14 years ago by angel_il

ctrl-home - moves the cursor to first character of the current line

i think your terminal send incorrect esc-sequence.
run 'cat' and press 'home' and show results, press 'ctrl-home' and show results too.
and show result
echo $TERM

comment:4 Changed 14 years ago by steevithak

Here's what I get. Home is first, followed by ctrl-home

$ cat
[OH[[5;5~

$ echo $TERM
xterm

I'm running a standard, unmodified Fedora 12 system. I've never had trouble with any previous version of Fedora or MC until the most recent MC update.

comment:5 Changed 14 years ago by steevithak

Ok, found the problem (Thanks for the help Ilia!). It's not really an MC bug. MC doesn't recognize the escape sequences sent by GNOME terminal for the ctrl-home and ctrl-end combinations. The new key bindings switched top of file to ctrl-home from ctrl-pgup (which works on GNOME). I'll report this back to RedHat? and perhaps they will add a patch so it MC and GNOME terminal will work together better in the future.

comment:6 Changed 14 years ago by angel_il

  • Status changed from new to closed
  • Resolution set to invalid

reason: "It's not really an MC bug." :)

comment:7 Changed 14 years ago by andrew_b

  • Milestone 4.7.1 deleted

comment:8 Changed 14 years ago by zaytsev

Как говорится, лед тронулся, господа присяжные заседатели (c)
It seems that we do have some news regarding this issue:

https://bugzilla.gnome.org/show_bug.cgi?id=600659

Let's hope that it will get resolved in a reasonable amount of time.

comment:9 Changed 12 years ago by steevithak

  • Branch state set to no branch

I realize this bug is closed but for other GNOME users trying to get MC to work, I though I'd offer an update. I'm still trying to get this bug fixed. Redhat seems unwilling to remap the MC config file as shipped with Fedora to use the pre-2009 MC keymap that worked with GNOME. As seen above the MC guys aren't going to change back to the pre-2009 code that worked with GNOME. I recently filed a bug directly with the GNOME vte developers in hopes they'll be more open to fixing this so we can finally get MC working with GNOME again. Here are the relevant bug links:

Redhat bug: Ctrl-PgUp? and Ctrl-PgDn? keys no longer work on MC
https://bugzilla.redhat.com/show_bug.cgi?id=551062

GNOME bug: Ctrl-PgUp? and Ctrl-PgDn? keys don't work in MC due to VTE bug
https://bugzilla.gnome.org/show_bug.cgi?id=674216

Note: See TracTickets for help on using tickets.