contour icon indicating copy to clipboard operation
contour copied to clipboard

Have keyboard input mappings be a per-terminal-profile thing like the colour scheme

Open whisperity opened this issue 4 years ago • 2 comments

Abstract

While colours can be set to be per-profile and selected as a command-line argument through specifying a profile, it seems the input_mapping is a global thing.

Motivation

Contour by default registers keybinds like Shift-Up to be a scroll thing. In byobu, Shift-Up is used in a horizontal split to go from the bottom to the top. Similarly there are plenty other keybinds like this. Now, while the scrolling keybinds are useful when it comes to a "normal" terminal (i.e. one that fully owns the buffer and doesn't have any magic like byobu underneath), the clashing is hard to configure because the inputs are globally set.

Specification

Have a key input_mapping under profile/<name> similarly to the colours key. And move everything in the default input mapping under a named key.

whisperity avatar Feb 25 '21 10:02 whisperity

Relates to #153. Many thanks. :)

christianparpart avatar Feb 25 '21 11:02 christianparpart

Thinking about this... while moving input mapping into profiles is surely beneficial, I can still tackle your issue better.

the Shift-Up should only be mapped on the condition that the the primary screen buffer is active (not the alternate screen buffer). Because screen & tmux both enter the alternate screen buffer, where changing the viewport doesn't make sense (usually, as you are not meant to have a line history).

christianparpart avatar Feb 25 '21 15:02 christianparpart