0

I would like a terminal for Ubuntu that supports PgDn and PgUp as the default functionality and to send them to the current Unix application when you press PgDn+Shift.

1

If you go back to the original terminal emulator, xterm, you can specify any actions for the keys. For example,

xterm -xrm 'XTerm*VT100.Translations: #override\n\
 ~Shift <KeyPress> Prior: scroll-back(1,halfpage)\n\
 ~Shift <KeyPress> Next:  scroll-forw(1,halfpage)\n\
  Shift <KeyPress> Prior: string(0x1b)string("[5~")\n\
  Shift <KeyPress> Next:  string(0x1b)string("[6~")'

This will scroll back a half page when the Prior key (page-up) is pressed without Shift, and insert the escape character and [5~ when pressed with Shift.

  • Thank you! I can't get this to work with shift. What does ~ mean and why are shift written four times? – William Jan 21 '17 at 17:14
  • The ~ before Shift means "not shift", i.e. the shift key must not be pressed for this keypress to match. – meuh Jan 21 '17 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.