Kaydet (Commit) d1d24b30 authored tarafından Nick Treleaven's avatar Nick Treleaven

Allow VTE to interpret F-keys (except if they're focus commands).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2039 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst a4abd282
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
Set Ctrl-Alt-P as default Prefs KB. Set Ctrl-Alt-P as default Prefs KB.
Change Decrease Indent default KB to Ctrl-U (very common action, Change Decrease Indent default KB to Ctrl-U (very common action,
and Ctrl-U was unused). and Ctrl-U was unused).
* src/keybindings.c:
Allow VTE to interpret F-keys (except if they're focus commands).
2007-11-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> 2007-11-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
......
...@@ -680,7 +680,7 @@ static gboolean set_sensitive(gpointer widget) ...@@ -680,7 +680,7 @@ static gboolean set_sensitive(gpointer widget)
#ifdef HAVE_VTE #ifdef HAVE_VTE
static gboolean check_vte(GdkEventKey *event, guint keyval) static gboolean check_vte(GdkModifierType state, guint keyval)
{ {
guint i; guint i;
GtkWidget *widget; GtkWidget *widget;
...@@ -689,13 +689,13 @@ static gboolean check_vte(GdkEventKey *event, guint keyval) ...@@ -689,13 +689,13 @@ static gboolean check_vte(GdkEventKey *event, guint keyval)
return FALSE; return FALSE;
if (gtk_window_get_focus(GTK_WINDOW(app->window)) != vc->vte) if (gtk_window_get_focus(GTK_WINDOW(app->window)) != vc->vte)
return FALSE; return FALSE;
if (event->state == 0) if (state == 0 && (keyval < GDK_F1 || keyval > GDK_F35))
return FALSE; // just to prevent menubar flickering return FALSE; // just to prevent menubar flickering
// make focus commands override any bash commands // make focus commands override any bash commands
for (i = GEANY_KEYS_GROUP_FOCUS; i < GEANY_KEYS_GROUP_TABS; i++) for (i = GEANY_KEYS_GROUP_FOCUS; i < GEANY_KEYS_GROUP_TABS; i++)
{ {
if (event->state == keys[i]->mods && keyval == keys[i]->key) if (state == keys[i]->mods && keyval == keys[i]->key)
return FALSE; return FALSE;
} }
...@@ -735,7 +735,7 @@ gboolean keybindings_got_event(GtkWidget *widget, GdkEventKey *event, gpointer u ...@@ -735,7 +735,7 @@ gboolean keybindings_got_event(GtkWidget *widget, GdkEventKey *event, gpointer u
// special cases // special cases
#ifdef HAVE_VTE #ifdef HAVE_VTE
if (vte_info.have_vte && check_vte(event, keyval)) if (vte_info.have_vte && check_vte(event->state, keyval))
return FALSE; return FALSE;
#endif #endif
if (check_construct_completion(event)) if (check_construct_completion(event))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment