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
Sis for the shift key
LEFTis for left arrow
RIGHTis for right arrow
UPis for up arrow
DOWNis 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.