0

Intro

Is there any way of mapping CTRL+ENTER to an F-key? (Inside the terminal ofcourse only) I've looked everywhere, I've tried so many things that I can't even recall. I had no luck and so I decide to replace gnome-terminal with Alacritty but still I'm left with the question.

Related Sources

Gnome-terminal doesn't use Xresources / Xdefaults to store its settings, therefore if you want Xdefaults' look in gnome-terminal you have to 'tune' it accordingly manually. Look under the valid menu entry to customize your colours and enter the values from your Xdefaults file.

KDE or Gnome applications like konsole and gnome-terminal have their own way of configuring key combos to actions; I don't know if that includes the ability to write arbitrary strings to the pseudo-tty master.

Here is the solution for xterm, gnome-terminal and any other terminal emulator for the XWindow system.

Giorgos Xou
  • 103
  • 4

1 Answers1

0

VTE, and thus GNOME Terminal, doesn't allow to modify the escape sequences that the keyboard's keys generate.

You can modify them in VTE's source code in src/keymap.cc, or I guess it's also possible to patch GNOME Terminal to grab the combo Ctrl+Enter before it would reach VTE and instead send whatever you want to send.

Maybe (I'm not sure) you can find and configure an xbindkeys-like app to mangle the keycode just for one particular application.

Or of course switching to a different terminal emulator is also a possibility.

egmont
  • 8,225