contour
contour copied to clipboard
Have keyboard input mappings be a per-terminal-profile thing like the colour scheme
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.
Relates to #153. Many thanks. :)
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).