public
Last active

Patch for vte 0.26.2 to enable use of Ctrl-Shift-Up and Ctrl-Shift-Down in applications; for http://superuser.com/q/230852/1686

  • Download Gist
README.md
Markdown

Patch written for "get ubuntu terminal to send an escape sequence" on Super User. It disables special handling of CtrlPageUp and CtrlPageDown in VTE.


Instructions for Ubuntu 10.04:

  1. Rebuild vte, the terminal emulation library:

    1. Install software required for compiling:

      sudo apt-get install git-core fakeroot
      sudo apt-get build-dep vte
      
    2. Download vte source code and apply the patch:

      cd /tmp
      git clone git://gist.github.com/771667.git patches
      apt-get source vte
      cd vte-0.23.5
      patch -p1 < ../patches/vte-0.23.5.patch
      
    3. Make a Debian package and install it:

      dpkg-buildpackage -us -uc
      sudo dpkg -i ../libvte9_0.23.5-*.deb
      
  2. Close all gnome-terminal processes.

  3. Enjoy -- until the next vte update...
vte-0.23.5.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
diff -ur vte-0.23.5/src/vte.c vte-0.23.5+patched/src/vte.c
--- vte-0.23.5/src/vte.c 2010-01-14 02:46:18.000000000 +0200
+++ vte-0.23.5+patched/src/vte.c 2011-01-09 15:19:01.000000000 +0200
@@ -4948,26 +4948,6 @@
}
break;
/* Keypad/motion keys. */
- case GDK_KP_Up:
- case GDK_Up:
- if (modifiers & GDK_CONTROL_MASK
- && modifiers & GDK_SHIFT_MASK) {
- vte_terminal_scroll_lines(terminal, -1);
- scrolled = TRUE;
- handled = TRUE;
- suppress_meta_esc = TRUE;
- }
- break;
- case GDK_KP_Down:
- case GDK_Down:
- if (modifiers & GDK_CONTROL_MASK
- && modifiers & GDK_SHIFT_MASK) {
- vte_terminal_scroll_lines(terminal, 1);
- scrolled = TRUE;
- handled = TRUE;
- suppress_meta_esc = TRUE;
- }
- break;
case GDK_KP_Page_Up:
case GDK_Page_Up:
if (modifiers & GDK_SHIFT_MASK) {
vte-0.26.2.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
diff -ur vte-0.26.2/src/vte.c vte-0.26.2+patched/src/vte.c
--- vte-0.26.2/src/vte.c 2010-11-13 14:18:41.000000000 +0200
+++ vte-0.26.2+patched/src/vte.c 2011-01-09 15:06:54.870000002 +0200
@@ -5153,26 +5153,6 @@
}
break;
/* Keypad/motion keys. */
- case GDK_KEY (KP_Up):
- case GDK_KEY (Up):
- if (modifiers & GDK_CONTROL_MASK
- && modifiers & GDK_SHIFT_MASK) {
- vte_terminal_scroll_lines(terminal, -1);
- scrolled = TRUE;
- handled = TRUE;
- suppress_meta_esc = TRUE;
- }
- break;
- case GDK_KEY (KP_Down):
- case GDK_KEY (Down):
- if (modifiers & GDK_CONTROL_MASK
- && modifiers & GDK_SHIFT_MASK) {
- vte_terminal_scroll_lines(terminal, 1);
- scrolled = TRUE;
- handled = TRUE;
- suppress_meta_esc = TRUE;
- }
- break;
case GDK_KEY (KP_Page_Up):
case GDK_KEY (Page_Up):
if (modifiers & GDK_SHIFT_MASK) {

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.