有没有什么方法可以在按下按钮后检测gtkdialog的组合键事件?我想要这样的东西:http://4.bp.blogspot.com/-YaHb1xQp1cA/TgCWahD0S4I/AAAAAAAACPM/YKsigh2HAIs/s1600/unity_grab_handles.png
提前谢谢!

最佳答案

我不知道它是否有用,但也许你可以试试这样的修改:

#------------- Accelerators --------------------------------------------------------

#------------- Accelerator Objects ---------------------------------------------
my $accel = Gtk2::AccelGroup->new();
#-------------------------------------------------------------------------------

#------------- Accelerator Shortcuts -------------------------------------------
my ( $key, $mods ) = Gtk2::Accelerator->parse( '<alt>T' );
#-------------------------------------------------------------------------------

#------------- Accelerator connecting ------------------------------------------
$accel->connect($key, $mods, [qw/visible/], sub { ifKeyTranslateGUI($clipboardSearchButton); });
#-------------------------------------------------------------------------------

#------------- Accelerator adding to window ------------------------------------
$mainWindow->add_accel_group ($accel);
#-------------------------------------------------------------------------------

10-08 20:23