$ git clone http://tcclient.ion.nu/tc_client.git
commit 605684bd7d4b0ab6f85032609c144eb9b057e9b3
Author: Alicia <...>
Date:   Wed Oct 12 22:56:28 2016 +0200

    tc_client-gtk: make scrolling with page up and page down work even if focus is on the input field.

diff --git a/ChangeLog b/ChangeLog
index 8af605b..49add71 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,9 +26,10 @@ tc_client-gtk: added workaround for libao not handling the "client_name" option
 tc_client-gtk: added support for broadcasting audio.
 tc_client-gtk: fixed some warnings found with G_DEBUG="fatal-criticals".
 tc_client-gtk: quit if the captcha window is closed.
-libcamera: added support for a virtual X11 camera.
+tc_client-gtk: make scrolling with page up and page down work even if focus is on the input field.
 tc_client-gtk and camviewer: updated to libavcodec's avcodec_{send,receive}_{frame,packet} API.
 camviewer: removed the old, buggy audio code.
+libcamera: added support for a virtual X11 camera.
 libcamera(v4l2): cache the frame and if there is no data to be read, return the cache instead of blocking.
 libcamera(escapi): fixed a bug that broke cams on windows unless you only use the first one.
 testbuilds.sh: adjusted for configure no longer accepting --enable-mic (since it's no longer experimental)
diff --git a/utilities/gtk/camviewer.c b/utilities/gtk/camviewer.c
index 019260f..06d4bd0 100644
--- a/utilities/gtk/camviewer.c
+++ b/utilities/gtk/camviewer.c
@@ -760,6 +760,29 @@ gboolean inputkeys(GtkWidget* widget, GdkEventKey* event, void* data)
     }
     return 1;
   }
+  if(event->keyval==GDK_KEY_Page_Up || event->keyval==GDK_KEY_KP_Page_Up ||
+     event->keyval==GDK_KEY_Page_Down || event->keyval==GDK_KEY_KP_Page_Down)
+  {
+    // Get the relevant chatview
+    GtkNotebook* tabs=GTK_NOTEBOOK(gtk_builder_get_object(gui, "tabs"));
+    int num=gtk_notebook_get_current_page(tabs);
+    struct user* user=0;
+    if(num>0)
+    {
+      GtkWidget* page=gtk_notebook_get_nth_page(tabs, num);
+      user=user_find_by_tab(page);
+    }
+    struct chatview* chatview;
+    if(user && user->pm_chatview)
+    {
+      chatview=user->pm_chatview;
+    }else{
+      chatview=mainchat;
+    }
+    // By just passing along the event we also get smooth scrolling, which GTK+ does not expose an API for
+    gtk_widget_event(GTK_WIDGET(chatview->textview), (GdkEvent*)event);
+    return 1;
+  }
   return 0;
 }