Using cat
in Terminal.app
in order to view the raw codes, I get the following:
$ cat
^[[D # LEFT
^[[1;2D # S-LEFT
^[[C # RIGHT
^[[1;2C # S-RIGHT
^[[A # UP
^[[A # S-UP
^[[B # DOWN
^[[B # S-DOWN
where:
S
is for the shift keyLEFT
is for left arrowRIGHT
is for right arrowUP
is for up arrowDOWN
is for down arrow
Thus, the shift key is ignored in conjunction with the up and down arrows, but not with the left and right arrows.
I don't see anything under Terminal > Preferences > Profiles > keyboard
that would explain this behaviour (following this answer, that is how I solved a similar problem).
I could probably use DefaultKeybinding.dict
(see this other answer for example) but that doesn't explain the behaviour.