I use a MacBook pro and am using Linux Mint. I know this is an Ubuntu forum but Mint is built on top of Ubuntu so I am trying here.

The Macbook Pro doesn't have a Page Down or Page Up button. Applications such as Epiphany and Terminal use these buttons to switch between tabs. Ubuntu and Mint both use APT so I assume all applications are the same if not extremely similar. You cannot re-key-bind the terminal nor Epiphany. So I tried the Keyboard settings app and Keyboard Layout app to see if I could change the keys. This proved futile.

What I want is either to rebind the keys in Epiphany and the Terminal, or bind Page up and Page down to something else.


I use a macbook air and the fn+up and fn+down keys provide page up and page down functionality.

Alternatively, you can map additional keys to the page up and down functions, i.e. the right command and alt/option keys (honestly, how often do you use them?) Some info on this can be found here:


The short version is to use the xev program to determine what the key codes you want to change are, and create a program (say, ~/.Xmodmap) with information that remaps the key. I use this to swap my capslock and delete keys using:

keycode 0x16 = Delete keycode 0x42 = Backspace

Then add the command "xmodmap ~/.Xmodmap" to either your ~/.profile or ~/.bashrc files, and then run the command xmodmap ~/.Xmodmap from terminal, and your changes should take effect.


You can press Ctrl + fn + up/down


I assume this same process will work for Ctrl as it did with Alt for me. Just be careful when testing the keys you assign using xbindkeys-config.

I read this https://help.ubuntu.com/community/KeyboardShortcuts which helped me figure out the following. While the xautomation package that includes the xte tool might be used instead of xvkbd to emit the key codes I used xvkbd to do the same thing.

sudo apt-get install xbindkeys xbindkeys-config xvkbd

xbindkeys --defaults > /home/your-user-name/.xbindkeysrc

For some reason this added a binding for Ctrl+F that I had to comment out. While perhaps a useful default example I needCtrl+F to find inside of web pages.

After figuring out the "keysims" of Prior for PgUp and Next for PgDown this wasn't too tough. Running and using xbindkeys-config resulted in the following entries in .xbindkeysrc for me.

"xvkbd -xsendevent -text "\[Prior]""
    m:0x18 + c:111
    Alt+Mod2 + Up

"xvkbd -xsendevent -text "\[Next]""
    m:0x18 + c:116
    Alt+Mod2 + Down

when using Ubuntu 12.04 precise pangolin after creating the .xbindkeysrc file it was detected and the xbindkeys program was run automatically on my next login.

So this should do what you want.

"xvkbd -xsendevent -text "\[Prior]""
    m:0x14 + c:111
    Ctrl+Mod2 + Up

"xvkbd -xsendevent -text "\[Next]""
    m:0x14 + c:116
    Ctrl+Mod2 + Down
  • Thanks for the formatting edits. The answer reads better now. – grantbow Jul 9 '18 at 20:31

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.