LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-16-2017, 08:15 AM   #1
Andrew256
LQ Newbie
 
Registered: May 2017
Posts: 12

Rep: Reputation: Disabled
Midnight Commander - Ctrl-enter doesn't work in Putty


Hi everyone

I'm literally banging my head against the table because googling doesn't help much.

I'm running Debian Wheezy and Midnight Commander there. When I open MC in a console directly on the server, Ctrl+enter hotkey puts currently selected file into commandline. But when I use MC in Putty, ctrl+enter enters the folder or executes the file instead, i.e. like just "enter". And I desperately need it to act like it needs to (puts selected file/folder in commandline) because my muscle memory is already trained.

I know that I can use Alt+enter or Ctrl-x>t instead, but that's not it.

I've tried different terminal types (xterm, linux), tried to explicitly map ctrl-enter in mc.keymap, nothing helps. I have no choice but to ask for help...
 
Old 05-16-2017, 08:38 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,505

Rep: Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548
probably you need to configure putty to handle Ctrl or Ctrl-Enter differently (is there a key binding somewhere?)
 
Old 05-16-2017, 10:39 AM   #3
Andrew256
LQ Newbie
 
Registered: May 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
probably you need to configure putty to handle Ctrl or Ctrl-Enter differently (is there a key binding somewhere?)
Actually I don't think this is Putty's fault, because if I login from another bash shell of another machine to Debian server and open MC, I get the same issue, while directly in the console there is no issue.

I think it might be something to do with terminal settings, but it got loads of settings and I've tried a bunch of them already...
 
Old 05-16-2017, 02:12 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,256
Blog Entries: 10

Rep: Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160Reputation: 5160
^ so what is this other shell (not putty?), and what is this other machine?
 
Old 05-16-2017, 05:38 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,713

Rep: Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549
mc is a just a program running in the terminal emulator. You'll have to "fix" the binding in putty, not mc.
 
Old 05-17-2017, 02:01 AM   #6
Andrew256
LQ Newbie
 
Registered: May 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks for the replies guys

Quote:
Originally Posted by ondoho View Post
^ so what is this other shell (not putty?), and what is this other machine?
If I open bash shell on another linux PC, and connect to the target PC using 'ssh <host> -l <login>', then open MC and I get the same issue (Ctrl-enter in MC acts like just Enter) So the issue is reproduced both in Putty and in Bash, therefore I suspect it's not putty but some sshd or terminal settng/mapping...
 
Old 05-17-2017, 02:14 AM   #7
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,505

Rep: Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548
ssh cannot have any influence on it. What do you mean by direct console (without X?) what kind of wm do you have?
 
Old 05-17-2017, 09:08 AM   #8
Andrew256
LQ Newbie
 
Registered: May 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
ssh cannot have any influence on it. What do you mean by direct console (without X?) what kind of wm do you have?
Ok, I did the following test and this is getting strange:

I run two Debian VM's on a VMware hypervisor. Let's call them VM_A and VM_B

When I connect to VM_A using VMware workstation (which simulates physicall access to the PC) I don't have this issue. Then, I connect to VM_B using VMware Workstation and from THERE I open ssh sesstion to VM_A, and I get this issue. So, to make it easier:

VMWare Workstation > VM_A = no issue
VMWare Worsktation > VM_B > SSH to VM_A = yes issue

Thank you very much for not abandoning me so far guys, I really want to know why is this happening.
 
Old 05-17-2017, 09:17 AM   #9
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,505

Rep: Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548
are these consoles or some kind of terminal apps? (GUI, or without gui ??)
 
Old 05-17-2017, 03:03 PM   #10
Yves.legault
LQ Newbie
 
Registered: Dec 2012
Location: Montreal, Quebec, Canada
Distribution: Debian
Posts: 22

Rep: Reputation: Disabled
How about using...
CTRL-SHIFT-C to copy a string
CTRL-SHIFT-V to paste it where your cursor is.

I often use CTRL-C in a web browser or a PDF document to copy a link and use CTRL-SHIFT-V in a terminal window to paste it where the cursor is currently located.
 
Old 05-17-2017, 06:35 PM   #11
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Try alt-Enter. The help in mc on fedora 25 states Alt-Enter copies the current file to command line, then says Ctrl-Enter does the same but may not work on some remote terminals.

From a w10 computer to my f25 computer, Ctrl-Enter does not work in a putty connection, but Alt-Enter does.
 
Old 05-17-2017, 06:49 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,713

Rep: Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549Reputation: 3549
So many variations - on gnome terminal, (Fedora 25) F1 for help in mc didn't work at all as terminal caught it first. Had to disable the binding in terminal (who needs it after all). With tilix, all the keys I use get passed straight through ...
 
Old 05-17-2017, 10:18 PM   #13
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Quote:
So many variations - on gnome terminal, (Fedora 25) F1 for help in mc didn't work at all as terminal
Same with Xfce on F25, but you can use the alternate method for function keys which is there because many desktops intercept some function keys particularly F1

Press and release esc followed by the number of the function key you want. So to get to the mc help, press & release esc followed by the number 1

Last edited by Doug G; 05-17-2017 at 10:20 PM.
 
Old 05-18-2017, 04:29 AM   #14
Andrew256
LQ Newbie
 
Registered: May 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
are these consoles or some kind of terminal apps? (GUI, or without gui ??)
Yes, they are GUI apps, but to eliminate them I've did the cleanest test possible:

2 physical PCs in a local network. Keyboard and mouse connected directly, no desktops or X's of any kind, just a plain clean console. I open MC on both PCs directly - no issue. I open SSH session from one of them to another (doesn't matter which) - issue is reproduced.

So the only difference is SSH session, I can't find anything else that can affect this behavior.

Quote:
Originally Posted by Doug G View Post
Try alt-Enter
Yes, Alt+enter works, the problem is that I've used to Ctrl+enter in FAR manager so much I can't live without it. More importantly, I think it's important to have a consistent hotkeys across all similar programs we use (file managers, text editors e.t.c) to use muscle memory to full capacity and maximize productivity.

Last edited by Andrew256; 05-18-2017 at 04:31 AM.
 
Old 05-18-2017, 04:36 AM   #15
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,505

Rep: Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548Reputation: 5548
how the localisation/keyboard are set (on the two boxes)?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] vim:ctrl+v command to select some data.But when I push ctrl+v.It doesn't work.. e3399 Linux - Newbie 20 12-07-2010 06:21 AM
Ctrl-enter doesn't work when running Midnight Commander in xterm narnie Linux - Software 6 02-19-2010 10:21 PM
Midnight Commander 4.6.2 (also 4.6.1) - F1 to F12 keys doesnt work dlugasx Solaris / OpenSolaris 1 06-25-2009 09:06 AM
midnight commander in putty 64-bit xp and debian fakie_flip Linux - Software 2 02-20-2008 03:59 AM
Midnight Commander doesn't list file(s) beginning with uppercase? sixerjman Linux - Software 0 02-14-2006 11:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration