micro-editor / micro-editor/micro

Ubuntu 20.04 + tmux: shift (or Alt) + arrows doesn't move, just output key code in console

Open
#2,227 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

Description of the problem or steps to reproduce

When running micro in tmux, the Shift-arrow and Alt-arrow output a key code in the console:

Shift Left : [1;2C]
Shift Right: [1;2F]
Shift Up   : [1;2A]
Shift Down : [1;2B]
C-Sht Right: [1;6C]
C-Sht Left : [1;6D]
C-Sht Up   : [1;6A]
C-Sht Down : [1;6B]

Alt Up/Dn  : [1;3A] [1;3D]
Alt Left   : [1;3D]
Alt Right  : [1;2C]
Alt { or } : nothing happens
  • Editing the file using nano (still within tmux) the modifierKey-arrow works OK.

  • Running micro OUTSIDE of tmux the problem disappear, ie. the modifierKey-arrow does perform their intended action.

This seems to be an issue of micro + tmux. But I don't have any keybindings in tmux for those keys combination. Would appreciate if you can help to for a solution.

Thanks

Specifications

micro -version
Version: 2.0.10
Commit hash: b976385
Compiled on August 07, 2021

OS: Ubuntu 20.04.3.
Terminal: tmux 3.0a

My .tmux.conf doesn't have anything special. The issue described above exists whether the below tmux settings are set or not.

set-window-option -g xterm-keys on
unbind S-Left
unbind S-Right

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the modifier-arrow behavior with micro 2.0.10 inside tmux 3.0a on Ubuntu 20.04. Compare it with micro outside tmux and with nano inside tmux, then check whether the relevant tmux.conf settings affect the result; done means Shift- and Alt-arrow combinations perform their intended editor actions instead of printing key codes.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, ubuntu
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.