OS X (El Capitan) Terminal Fn-Up and Fn-Down stop working as Page Up and Page Down

bashsshterminal

I've identified a strange "state" my Terminal program seems to get into.

It doesn't happen on all tabs — right now, one tap can Page Up/Down properly, and another one can't. When I open a new one, it works normally.

When I'm SSH-ed into a host, the Fn-{Up,Down} act as if I didn't push Fn at all (it just scrolls through command history). When I Ctrl-D and come back to my localhost, Fn-{Up,Down} now enters a tilde (~) while making the system alarm sound, \a I guess.

Typing 'env' gives the same output for a working and a non-working xterm.

TERM_PROGRAM=Apple_Terminal
SHELL=/bin/bash
TERM=xterm-256color
TMPDIR=/var/folders/5k/cj6xf05d5_d_m22mx1wswsz40000gn/T/Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.7GeRJow4kg/Render
TERM_PROGRAM_VERSION=361.1
TERM_SESSION_ID=4B6653B9-5A28-4029-AF34-E1CC01832446
USER=[username]
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.qQDRCEL1Qm/Listeners __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
PWD=/Users/[username]
LANG=en_US.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/[username]
LOGNAME=[username]
_=/usr/bin/env

Also, moving around the program's drop-down menus didn't seem to show any options that I was unaware of.

Direction towards finding the source of this issue? It happens maybe once a day, not the end of the world, but I wish I knew where it came from.

Not using tmux or screen or anything like that.

Best Answer

I had the same problem. To solve the problem when it appears: Open an ssh connection and close it again. Then it worked for me.