my X60 keyboard has those rather convenient “next page” and “previous page” keys (located just above and to the side of the cursor keys) which i’m using to switch to the next or previous tab in konsole and firefox:
- adding support for that in konsole was rather easy: just use konsole’s “settings->configure shortcuts…” (go to next session/go to previous session),
- adding support for it in firefox was still easy: get keyconfig and configure “f4kc_NextTab” on F20, and “f4kc_PrevTab” on F19
pidgin was not that easy. turns out key configurations are hard coded for stuff like the switching to next tab1
as i’m running ubuntu i wanted to use the existing ubuntu pidgin package and modify it for my purposes. i found a nice HOWTO at cyberciti describing how to rebuild a ubuntu (or debian package from source):
# if you've installed this stuff before, skip this step % apt-get install build-essential fakeroot dpkg-dev % mkdir pidgin % cd pidgin % apt-get source pidgin % apt-get build-dep pidgin % dpkg-source -x pidgin_2.2.1-1ubuntu4.1.dsc % cd pidgin-2.2.1 % # modify pidgin source % dpkg-buildpackage -rfakeroot -b % cd .. % dpkg -i pidgin*.deb
and here’s the diff to apply to pidgin/gtkconv.c:
*** gtkconv.c.orig 2008-01-31 20:09:24.000000000 +0100
--- gtkconv.c 2008-01-31 20:10:46.000000000 +0100
***************
*** 1899,1904 ****
--- 1899,1919 ----
return TRUE;
}
break;
+ case GDK_F20:
+ if (!pidgin_conv_window_get_gtkconv_at_index(win, curconv + 1))
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), 0);
+ else
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), curconv + 1);
+ return TRUE;
+ break;
+
+ case GDK_F19:
+ if (!pidgin_conv_window_get_gtkconv_at_index(win, curconv - 1))
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), -1);
+ else
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), curconv - 1);
+ return TRUE;
+ break;
}
}
return FALSE;
oh, and here’s my “$HOME/.xmodmaprc”:
keycode 144 = XF86AudioPrev keycode 153 = XF86AudioNext keycode 162 = XF86AudioPlay keycode 164 = XF86AudioStop keycode 146 = XF86ScreenSaver keycode 227 = Menu keycode 249 = XF86ZoomIn keycode 234 = F19 keycode 233 = F20
i’ve placed a little script in “$HOME/.kde/Autostart”:
#!/bin/bash xmodmap $HOME/.xmodmaprc
to have those keybindings set up on login.
-
…or the pidgin folks have done a tremendous job of obscuring the information of how to customize this… ↩
