按下按钮后,有什么方法可以检测gtkdialog的组合键事件?我是这样的:http://4.bp.blogspot.com/-YaHb1xQp1cA/TgCWahD0S4I/AAAAAAAACPM/YKsigh2HAIs/s1600/unity_grab_handles.png 提前谢谢!
答案 0 :(得分:1)
我不知道它是否有帮助,但也许您可以尝试这样的修改:
#------------- 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);
#-------------------------------------------------------------------------------