gnome-terminal ALT-# tab switch

I hope this is the right place to send this. I need to find out how gnome-terminal gets around passing keys to Bash. I write a terminal Tilda that is also in gtk+ and uses vte. I want to be able to ahve Alt+1, Alt+2, ... switch between tilda's open tabs. This works fine except that once I switch to the other tab it goes into the bash readline numerical arguments passing option. Example: If I am in tab 2 and hit Alt+1 it will move me to tab 1 and then print out (Arg : 1) in the Tab 1 terminal. Gnome-terminal only sends the Alt+# to Bash when there is not a tab #. How is this possible? I looked through the code used for the accelerators but found nothing that stuck out as causing this. I use:

goto_tab_closure_1 = g_cclosure_new_swap ((GCallback) goto_tab_1, tw, NULL);
gtk_accel_group_connect (accel_group, '1', GDK_MOD1_MASK, GTK_ACCEL_VISIBLE, goto_tab_closure_1);

for setting up an accel to catch Alt+1 and then go to the first tab.

Also, why did gnome-terminal decide to override a Bash feature?

Tristan Sloughter

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]