Skip to main content
clarify
Source Link
Thomas Dickey
  • 79.2k
  • 9
  • 189
  • 289

The manual page is not clear, but reading the source code helps:

  • take a look at input-keys.c, and you will see the keys, listed in a table.
  • the table is used in the same file, in input_key
  • near the top of the file, there's a comment:
    /*
     * This file is rather misleadingly named, it contains the code which takes a
     * key code and translates it into something suitable to be sent to the
     * application running in a pane (similar to input.c does in the other
     * direction with output).
     */

Your shell is the application that the comment refers to.

The terminal-overrides is used to modify the terminal description which tmux reads, to allow you to work with configurations (of the external "real" terminal) which do not match the terminal description:

tmux translates keys into its own set of escape sequences (matching the ones in screen, with the exception that it adds the xterm-keys option). The comment at the top of window.c summarizes this:

 * A pane has two buffers attached, these are filled and emptied by the main
 * server poll loop. Output data is received from pty's in screen format,
 * translated and returned as a series of escape sequences and strings via
 * input_parse (in input.c). Input data is received as key codes and written
 * directly via input_key.

The manual page says

default-terminal terminal
Set the default terminal for new windows created in this session - the default value of the TERM environment variable. For tmux to work correctly, this must be set to ‘screen’, ‘tmux’ or a derivative of them.

The reason for the restriction is that there's no way to customize the data in input-keys.c in the way you would like.

The manual page is not clear, but reading the source code helps:

  • take a look at input-keys.c, and you will see the keys, listed in a table.
  • the table is used in the same file, in input_key
  • near the top of the file, there's a comment:
    /*
     * This file is rather misleadingly named, it contains the code which takes a
     * key code and translates it into something suitable to be sent to the
     * application running in a pane (similar to input.c does in the other
     * direction with output).
     */

Your shell is the application that the comment refers to.

The terminal-overrides is used to modify the terminal description which tmux reads, to allow you to work with configurations (of the external "real" terminal) which do not match the terminal description:

tmux translates keys into its own set of escape sequences (matching the ones in screen, with the exception that it adds the xterm-keys option).

The manual page says

default-terminal terminal
Set the default terminal for new windows created in this session - the default value of the TERM environment variable. For tmux to work correctly, this must be set to ‘screen’, ‘tmux’ or a derivative of them.

The reason for the restriction is that there's no way to customize the data in input-keys.c in the way you would like.

The manual page is not clear, but reading the source code helps:

  • take a look at input-keys.c, and you will see the keys, listed in a table.
  • the table is used in the same file, in input_key
  • near the top of the file, there's a comment:
    /*
     * This file is rather misleadingly named, it contains the code which takes a
     * key code and translates it into something suitable to be sent to the
     * application running in a pane (similar to input.c does in the other
     * direction with output).
     */

Your shell is the application that the comment refers to.

The terminal-overrides is used to modify the terminal description which tmux reads, to allow you to work with configurations (of the external "real" terminal) which do not match the terminal description:

tmux translates keys into its own set of escape sequences (matching the ones in screen, with the exception that it adds the xterm-keys option). The comment at the top of window.c summarizes this:

 * A pane has two buffers attached, these are filled and emptied by the main
 * server poll loop. Output data is received from pty's in screen format,
 * translated and returned as a series of escape sequences and strings via
 * input_parse (in input.c). Input data is received as key codes and written
 * directly via input_key.

The manual page says

default-terminal terminal
Set the default terminal for new windows created in this session - the default value of the TERM environment variable. For tmux to work correctly, this must be set to ‘screen’, ‘tmux’ or a derivative of them.

The reason for the restriction is that there's no way to customize the data in input-keys.c in the way you would like.

Source Link
Thomas Dickey
  • 79.2k
  • 9
  • 189
  • 289

The manual page is not clear, but reading the source code helps:

  • take a look at input-keys.c, and you will see the keys, listed in a table.
  • the table is used in the same file, in input_key
  • near the top of the file, there's a comment:
    /*
     * This file is rather misleadingly named, it contains the code which takes a
     * key code and translates it into something suitable to be sent to the
     * application running in a pane (similar to input.c does in the other
     * direction with output).
     */

Your shell is the application that the comment refers to.

The terminal-overrides is used to modify the terminal description which tmux reads, to allow you to work with configurations (of the external "real" terminal) which do not match the terminal description:

tmux translates keys into its own set of escape sequences (matching the ones in screen, with the exception that it adds the xterm-keys option).

The manual page says

default-terminal terminal
Set the default terminal for new windows created in this session - the default value of the TERM environment variable. For tmux to work correctly, this must be set to ‘screen’, ‘tmux’ or a derivative of them.

The reason for the restriction is that there's no way to customize the data in input-keys.c in the way you would like.