Some keyboards have keys that emit the XF86XK_Forward and XF86XK_Back key codes. These key codes are usually supported by web browsers to go forwards or backwards in history. I patched my mupdf so that pressing these keys will turn to the previous or next page. On my keyboard these keys are easier to reach than page_up and page_down. Maybe some other people will also like this. So, here's what to do: In the file apps/x11_main.c add the header line #include <X11/XF86keysym.h> and in the section for deciding which direction keys were pressed, add the two lines that have a comment after them switch (keysym) { case XK_Escape: len = 1; buf[0] = '\033'; break; case XK_Up: len = 1; buf[0] = 'k'; break; case XK_Down: len = 1; buf[0] = 'j'; break; case XK_Left: len = 1; buf[0] = 'b'; break; case XK_Right: len = 1; buf[0] = ' '; break; case XK_Page_Up: case XF86XK_Back: //add this line len = 1; buf[0] = ','; break; case XK_Page_Down: case XF86XK_Forward: //add this line len = 1; buf[0] = '.'; break; }
cool, added to Gentoo ;-) http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-text/mupdf/files/mupdf-9999-forward_back.patch?revision=1.1&view=markup
commit 2f1f3840295b8152d44d00a3c14b58a737baefa7 Author: Tor Andersson <tor.andersson@artifex.com> Date: Tue May 27 14:48:28 2014 +0200 Fix 693494: Support media buttons for navigation on X11.