Repository navigation
savannah: ctrl-\ hotlist key won't work under tty<i> #21
Copy link
Copy link
Open
Labels
area: coreIssues not related to a specific subsystemIssues not related to a specific subsystemprio: mediumHas the potential to affect progressHas the potential to affect progress
Milestone
Description
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 input | Severity: | 3 - Normal |
| Status: | None | Privacy: | Public |
| Assigned to: | None | Open/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:
- 0001-add-hotkey-M-C-for-hotlist.patch (raw) by
iNode(@iNode) onJun 22, 2009 at 5:58 UTC - 0001-make-hotkeys-which-involve-alt-gr-work-in-the-linux-.patch (raw) by
ossi(@ossilator) onOct 8, 2020 at 19:08 UTC
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: coreIssues not related to a specific subsystemIssues not related to a specific subsystemprio: mediumHas the potential to affect progressHas the potential to affect progress
Activity
mc-butler commentedon Apr 20, 2009
mc-butler commentedon Jun 14, 2009
Double for #195. Also blocked by #212.
mc-butler commentedon Jun 14, 2009
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.
mc-butler commentedon Jun 15, 2009
#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 ."?
mc-butler commentedon Jun 15, 2009
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-/.
mc-butler commentedon Jun 15, 2009
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?
mc-butler commentedon Jun 15, 2009
mc-butler commentedon Jun 17, 2009
mc-butler commentedon Jun 17, 2009
not every keyboard problem is a terminfo/termcap problem ... ;)
mc-butler commentedon Jun 18, 2009
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?
mc-butler commentedon Jun 19, 2009
Ok, I can check it, ([] - keystroke):
and also in vim.
mc-butler commentedon Jun 19, 2009
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.
mc-butler commentedon Jun 19, 2009
mc-butler commentedon Jun 19, 2009
mc-butler commentedon Jun 21, 2009
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.
17 remaining items
mc-butler commentedon Sep 30, 2009
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.
mc-butler commentedon Oct 20, 2009
Ticket #287 provides a patch for Esc + key -> F-key emulation, if the key needs to use modifier.
mc-butler commentedon Oct 20, 2009
mc-butler commentedon Feb 28, 2010
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.
mc-butler commentedon Feb 28, 2010
Replying to powerman:
This was fixed in 4.7.0.3 (#1926, [88d328a]). Please upgrade your MC.
mc-butler commentedon Jan 11, 2014
mc-butler commentedon Nov 29, 2016
mc-butler commentedon Oct 8, 2020
zyv commentedon Apr 20, 2025
@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
and I'm not sure what that should be.
ossilator commentedon Apr 20, 2025
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?
zyv commentedon Sep 27, 2025
I think this issue might be resolved by #4769.
ossilator commentedon Sep 29, 2025
yes, it would be. thought the question of an adequate fallback remains.
Merge pull request MidnightCommander#21 from ilia-maslakov/DEV_arcmc