Bug#899376: gnome-terminal: Ctrl-Shift-Enter/Ctrl-Enter in MC isn't working on Wayland

2018-05-23 Thread Egmont Koblinger
Hi,

Terminal emulators don't send anything special on Ctrl-(Shift-)Enter, they
can only send the same newline they do on Enter.

MC has a hack called X11 support: Whenever it receives a newline from the
terminal emulator, it queries the X server whether any modifier is pressed
at that time. That's how Ctrl-(Shift-)Enter can have different actions.

Give it a try under X11: do an "unset DISPLAY" and then start up "mc",
these keys won't work specially anymore because mc can no longer find the X
server.

xterm still runs via the X compatibility layer called XWayland, that's why
this hack still works there. GNOME Terminal, on the other hand, is a native
Wayland app (if run under Wayland), there's no X server involved to connect
to and query.

I'm almost certain that Wayland's security model doesn't allow the same
hack; but even if it does, it's not (yet) implemented in mc.

Alt-Enter should still do the same as Ctrl-Enter used to do with the X11
hack, since in that case the terminal emulator sends a different sequence.
I think the best you can do now is get used to Alt-Enter.

I don't know off the top of my head how to bind some keypress to
Ctrl-Shift-Enter's action, and wherever it's possible at all; you should
consult mc's documentation. I guess mc should add some alternate keybinding
by default.

mc's manual mentions at C-Enter and C-Shift-Enter that "[m]ay not work on
remote systems and some terminals"

cheers,
egmont


Bug#899376: gnome-terminal: Ctrl-Shift-Enter/Ctrl-Enter in MC isn't working on Wayland

2018-05-23 Thread Andrey Skvortsov
Package: gnome-terminal
Version: 3.28.0-1
Severity: normal

Dear Maintainer,

if gnome-terminal is running in GNOME running on Wayland,
then it's impossible to use Ctrl-Shift-Enter and Ctrl-Enter hotkeys in Midnight
Commander (MC).
Instead of coping full path or directory (or file) name into command line,
mc enters selected directory like if only 'Enter' key was pressed.
These hotkeys are working in gnome-terminal running on Xorg. They are also in
mc started in xterm running on Wayland.
Therefore I expect this problem is specific to gnome-terminal.

To reproduce the problem start mc in gnome-terminal.
Select any directory in mc panel using arrow keys and press Ctrl-Shift-Enter or
Ctrl-Enter.
Correspondingly full path or directory name should be copied into command line.



-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.16.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gnome-terminal depends on:
ii  dbus-user-session [default-dbus-session-bus]  1.12.8-2
ii  dbus-x11 [dbus-session-bus]   1.12.8-2
ii  dconf-gsettings-backend [gsettings-backend]   0.28.0-2
ii  gnome-terminal-data   3.28.0-1
ii  gsettings-desktop-schemas 3.28.0-1
ii  libatk1.0-0   2.28.1-1
ii  libc6 2.27-3
ii  libdconf1 0.28.0-2
ii  libglib2.0-0  2.56.1-2
ii  libgtk-3-03.22.29-3
ii  libpango-1.0-01.42.0-1
ii  libuuid1  2.32-0.1
ii  libvte-2.91-0 0.52.0-1
ii  libx11-6  2:1.6.5-1

Versions of packages gnome-terminal recommends:
ii  gvfs   1.36.1-1
ii  nautilus-extension-gnome-terminal  3.28.0-1
ii  yelp   3.28.1-1

gnome-terminal suggests no packages.

-- no debconf information