just use the modern key sym names
This commit is contained in:
parent
997b67895f
commit
f30aab293f
23
termite.c
23
termite.c
|
@ -1,14 +1,9 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include <gdk/gdkkeysyms.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <vte/vte.h>
|
#include <vte/vte.h>
|
||||||
|
|
||||||
#if GTK_CHECK_VERSION(2, 90, 7)
|
|
||||||
#include <gdk/gdkkeysyms-compat.h>
|
|
||||||
#else
|
|
||||||
#include <gdk/gdkkeysyms.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
|
@ -82,30 +77,30 @@ static gboolean key_press_cb(GtkWidget *vte, GdkEventKey *event, search_dialog_i
|
||||||
const GdkModifierType modifiers = event->state & gtk_accelerator_get_default_mod_mask();
|
const GdkModifierType modifiers = event->state & gtk_accelerator_get_default_mod_mask();
|
||||||
if (modifiers == (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) {
|
if (modifiers == (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) {
|
||||||
switch (gdk_keyval_to_lower(event->keyval)) {
|
switch (gdk_keyval_to_lower(event->keyval)) {
|
||||||
case GDK_c:
|
case GDK_KEY_c:
|
||||||
vte_terminal_copy_clipboard(VTE_TERMINAL(vte));
|
vte_terminal_copy_clipboard(VTE_TERMINAL(vte));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case GDK_v:
|
case GDK_KEY_v:
|
||||||
vte_terminal_paste_clipboard(VTE_TERMINAL(vte));
|
vte_terminal_paste_clipboard(VTE_TERMINAL(vte));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case GDK_p:
|
case GDK_KEY_p:
|
||||||
vte_terminal_search_find_previous(VTE_TERMINAL(vte));
|
vte_terminal_search_find_previous(VTE_TERMINAL(vte));
|
||||||
vte_terminal_copy_primary(VTE_TERMINAL(vte));
|
vte_terminal_copy_primary(VTE_TERMINAL(vte));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case GDK_n:
|
case GDK_KEY_n:
|
||||||
vte_terminal_search_find_next(VTE_TERMINAL(vte));
|
vte_terminal_search_find_next(VTE_TERMINAL(vte));
|
||||||
vte_terminal_copy_primary(VTE_TERMINAL(vte));
|
vte_terminal_copy_primary(VTE_TERMINAL(vte));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case GDK_f:
|
case GDK_KEY_f:
|
||||||
open_search_dialog(vte, false, info);
|
open_search_dialog(vte, false, info);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case GDK_b:
|
case GDK_KEY_b:
|
||||||
open_search_dialog(vte, true, info);
|
open_search_dialog(vte, true, info);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case GDK_j:
|
case GDK_KEY_j:
|
||||||
search(VTE_TERMINAL(vte), url_regex, false);
|
search(VTE_TERMINAL(vte), url_regex, false);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case GDK_k:
|
case GDK_KEY_k:
|
||||||
search(VTE_TERMINAL(vte), url_regex, true);
|
search(VTE_TERMINAL(vte), url_regex, true);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue