Skip to content

savannah: ctrl-\ hotlist key won't work under tty<i> #21

Open

Description

@mc-butler

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/21
Reporter ossi (@ossilator)
Mentions sbrabec@….cz, powerman-asdf@….ru

Original: http://savannah.gnu.org/bugs/?13729

Submitted by:Oswald Buddenhagen <ossi>Submitted on:Mon 11 Jul 2005 04:00:03 PM UTC
Category:Keyboard inputSeverity:3 - Normal
Status:NonePrivacy:Public
Assigned to:NoneOpen/Closed:Open
Release:current (CVS or snapshot)Operating System:GNU/Linux

Original submission:

in the linux console with a german keyboard layout, one is unable 
to get to the directory hotlist via ctrl-\.
in this layout, \ is altgr-ß (equivalent to ralt-= on an american 
keyboard). i suspect that mc refuses to activate the hotkey, 
because it finds ralt to be pressed.
this behavior is new in mc 4.6. 

Comment 1 by Oswald Buddenhagen <ossi> at Wed 21 Sep 2005 05:19:41 PM UTC:

i came up with this hack - it just makes the right alt key not be 
recognized as an alt key at all.
i have no idea how to fix it properly - one'd have to ask the 
keymap whether the ralt is part of the keycode or an additional 
modifier.
hard-coding exceptions activated after a keymap query might work, 
but is utterly ugly. well, the code already has similar hacks to 
accomodate all types of terminals ...

Comment 2 by Roland Eggner <robiol262> at Wed 29 Mar 2006 12:54:13 PM UTC:

I found a partial solution:
Ctrl+4 (left ctrl key + "4" on main part of keyboard)
brings mc hotlist, IF running in KDE console.
Works with my Notebook Toshiba Satellite 3000-514
and this versions: SuSE-8.2/KDE-3.1.1/mc-4.6.0-336,
and also Debian-etch/KDE-3.5.1/mc-4.6.1-1.
If it works on other machines too: should be added to help files.

More satisfactory would be an additional keybinding
- I suppose ctrl+H - that works with german
keyboard layout outside of X, too.
Until now, outside of X I must use menu entry,
have no keybinding for accessing the hotlist.
Only "add to hotlist" Ctrl-X H works.

Note

Original attachments:

Activity

  1. mc-butler commented on Apr 20, 2009

    @mc-butler
    Author

    Changed by styx (@styx) on Apr 20, 2009 at 9:09 UTC (comment 1)

    • Milestone set to 4.7
  2. mc-butler commented on Jun 14, 2009

    @mc-butler
    Author

    Changed by iNode (@iNode) on Jun 14, 2009 at 22:40 UTC (comment 2)

    • Blocked by set to #212
    • Status changed from new to accepted
    • Owner set to iNode

    Double for #195. Also blocked by #212.

  3. mc-butler commented on Jun 14, 2009

    @mc-butler
    Author

    Changed by ossi (@ossilator) on Jun 14, 2009 at 23:15 UTC (comment 3)

    relaying this to #212 isn't particularly nice. nobody wants to go through extensive configurations just to get the keyboard working in a particular application. am i expected to do that with every independent account i use mc on (4 as of now)?

    both the linux console and x11 would actually allow querying the keyboard map, and for other terminals modifier querying isn't done in the first place anyway.

    the much simpler approach would be making my hack an option. actually, FAR has exactly such an option ... not that i like the idea too much.

  4. mc-butler commented on Jun 15, 2009

    @mc-butler
    Author

    Changed by iNode (@iNode) on Jun 15, 2009 at 5:11 UTC (comment 4)

    #212 allow to create common configuration schemes that will be nice for all (or about it) with lower costs. Oh, yes, it was described in #195. ;)

    So for that issue, we will need hot-key in "classic" schema:
    C-x prefix seems to be reasonable and consistent.
    What do you think about "C-x ."?

  5. mc-butler commented on Jun 15, 2009

    @mc-butler
    Author

    Changed by ossi (@ossilator) on Jun 15, 2009 at 7:20 UTC (comment 5)

    this still doesn't solve the problem - it works around it. kinda backwards to have to learn new hotkeys to "fix" a regression, don't you think?
    fwiw, i hate those c-x "escape sequences". i feel lucky that none of them is part of my regular workflow. as opposed to c-/.

  6. mc-butler commented on Jun 15, 2009

    @mc-butler
    Author

    Changed by iNode (@iNode) on Jun 15, 2009 at 9:43 UTC (comment 6)

    in the linux console with a german keyboard layout, one is unable
    to get to the directory hotlist via ctrl-\

    Are you sure that is not terminfo issue?
    Can you check it now with old version of mc
    and acknowledge that is work in your current environment?

  7. mc-butler commented on Jun 15, 2009

    @mc-butler
    Author

    Changed by angel_il (@ilia-maslakov) on Jun 15, 2009 at 13:24 UTC (comment 7)

    • Milestone changed from 4.7 to future releases
  8. mc-butler commented on Jun 17, 2009

    @mc-butler
    Author

    Changed by slavazanko (@slavaz) on Jun 17, 2009 at 11:37 UTC (comment 8)

    • Milestone changed from future releases to 4.7.0-pre1
  9. mc-butler commented on Jun 17, 2009

    @mc-butler
    Author

    Changed by ossi (@ossilator) on Jun 17, 2009 at 21:25 UTC (comment 9)

    not every keyboard problem is a terminfo/termcap problem ... ;)

  10. mc-butler commented on Jun 18, 2009

    @mc-butler
    Author

    Changed by iNode (@iNode) on Jun 18, 2009 at 6:06 UTC (comment 10)

    Yes, I know it.

    But it's very old bug and we need to be sure that
    we can check correctness of fix in current environment.

    So, can you check it now with old version of mc
    and acknowledge that is work in your current environment?

  11. mc-butler commented on Jun 19, 2009

    @mc-butler
    Author

    Changed by iNode (@iNode) on Jun 19, 2009 at 6:25 UTC (comment 11)

    Ok, I can check it, ([] - keystroke):

    setxkbmap -layout us,de
    echo "[C+vC+\][space][change to de][C+v C+RAlt+-]" | od -c
    

    and also in vim.

  12. mc-butler commented on Jun 19, 2009

    @mc-butler
    Author

    Changed by iNode (@iNode) on Jun 19, 2009 at 7:19 UTC (comment 12)

    • Blocked by #212 deleted

    I checked it in my environment.

    All work in mc builded with ncursesw, so it's slang bug.

    Please, write bugreport to slang developers or your distro maintainers.

  13. mc-butler commented on Jun 19, 2009

    @mc-butler
    Author

    Changed by iNode (@iNode) on Jun 19, 2009 at 7:19 UTC (comment 13)

    • Status changed from accepted to testing
    • Resolution set to invalid
  14. mc-butler commented on Jun 19, 2009

    @mc-butler
    Author

    Changed by slavazanko (@slavaz) on Jun 19, 2009 at 7:43 UTC (comment 14)

    • Status changed from testing to closed
  15. mc-butler commented on Jun 21, 2009

    @mc-butler
    Author

    Changed by ossi (@ossilator) on Jun 21, 2009 at 14:39 UTC (comment 15)

    • Status changed from closed to reopened
    • Resolution invalid deleted

    complete fail on your side. the ticket title clearly states that this is *not* about an x environment.
    this is *solely* about the games mc plays with modifier keys and has *nothing* to do with slang, ncurses or the key translation of either. the proof is trivial: just "ssh localhost" to make mc think it's not running on a local linux console any more and thus skip trying to determine the modifier state.

  16. 17 remaining items

  17. mc-butler commented on Sep 30, 2009

    @mc-butler
    Author

    Changed by ossi (@ossilator) on Sep 30, 2009 at 22:11 UTC (comment 32)

    well, yeah. lots of rtfm. :)

    anyway, for starters, just implement the "treat right alt as alt" switch like FAR does. automating that for known terminal types would be level 2.

  18. mc-butler commented on Oct 20, 2009

    @mc-butler
    Author

    Changed by sbrabec (sbrabec@….cz) on Oct 20, 2009 at 9:38 UTC (comment 33)

    Ticket #287 provides a patch for Esc + key -> F-key emulation, if the key needs to use modifier.

  19. mc-butler commented on Oct 20, 2009

    @mc-butler
    Author

    Changed by sbrabec (sbrabec@….cz) on Oct 20, 2009 at 9:38 UTC (comment 34)

    • Cc changed from ossi to ossi, sbrabec@….cz
  20. mc-butler commented on Feb 28, 2010

    @mc-butler
    Author

    Changed by powerman (powerman-asdf@….ru) on Feb 28, 2010 at 14:40 UTC (comment 35)

    • Cc changed from ossi, sbrabec@….cz to ossi, sbrabec@….cz, powerman-asdf@….ru

    I use Gentoo and xterm. Ctrl-backslash works ok in app-misc/mc-4.7.0_pre3 built with ncurses. But after today's upgrade to latest stable (in Gentoo) app-misc/mc-4.7.0.1, I found ctrl-backslash will kill mc (usual SIGQUIT, I suppose) built with ncurses but works ok if mc built with slang.

  21. mc-butler commented on Feb 28, 2010

    @mc-butler
    Author

    Changed by andrew_b (@aborodin) on Feb 28, 2010 at 15:49 UTC (comment 35.36)

    Replying to powerman:

    But after today's upgrade to latest stable (in Gentoo) app-misc/mc-4.7.0.1, I found ctrl-backslash will kill mc (usual SIGQUIT, I suppose) built with ncurses but works ok if mc built with slang.

    This was fixed in 4.7.0.3 (#1926, [88d328a]). Please upgrade your MC.

  22. mc-butler commented on Jan 11, 2014

    @mc-butler
    Author

    Changed by ossi (@ossilator) on Jan 11, 2014 at 15:47 UTC (comment 37)

    • Reporter changed from slavazanko to ossi
    • Cc changed from ossi, sbrabec@….cz, powerman-asdf@….ru to sbrabec@….cz, powerman-asdf@….ru
    • Branch state set to no branch
    • Description edited
  23. mc-butler commented on Nov 29, 2016

    @mc-butler
    Author

    Changed by andrew_b (@aborodin) on Nov 29, 2016 at 7:12 UTC (comment 38)

    • Status changed from reopened to assigned
    • Owner iNode deleted
  24. mc-butler commented on Oct 8, 2020

    @mc-butler
    Author

    Changed by ossi (@ossilator) on Oct 8, 2020 at 19:08 UTC

  25. added theissue type on Feb 27, 2025
  26. zyv commented on Apr 20, 2025

    @zyv
    Member

    @ossilator so as a bottom line, is there a big downside to treating AltGr as Alt (as in does it break anything) or could we just commit it?

    I tried to read through your argument, and apparently the first suggested approach was a hack for a particular key combination, which I think is unacceptable.

    Removing the distinction between Alt and AltGr seems fine to me, but you said yourself that no one does it, and it's not to be expected, or did I read that wrong?

    Is there even a "correct" solution?

    I'm asking because we could

    1. Commit the hack
    2. Close the issue as a wontfix
    3. Leave it open to implement the theoretical "correct" solution

    and I'm not sure what that should be.

  27. ossilator commented on Apr 20, 2025

    @ossilator
    Contributor

    no, i want to introduce a distinction between alt (lalt) and altgr (ralt), because that's what the international keymaps really do, while mc incorrectly conflates the modifiers.

    i wouldn't mind committing my hack, but i suspect Someone (TM) would complain, hence the suggestion to make it optional (as FAR does), or even auto-detect whether it should be enabled (by querying the keymap for ralt's meaning, using whichever "side channel" mc is using to query the modifier state in the first place (x or the vt)).

    i wonder whether kitty's extended keyboard protocol takes this into consideration when reporting the alt state?

  28. zyv commented on Sep 27, 2025

    @zyv
    Member

    I think this issue might be resolved by #4769.

  29. ossilator commented on Sep 29, 2025

    @ossilator
    Contributor

    yes, it would be. thought the question of an adequate fallback remains.

  30. added a commit that references this issue on Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues not related to a specific subsystemprio: mediumHas the potential to affect progress

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions