转自:http://blog.csdn.net/wwp1026/article/details/7029877
display.addFilter(SWT.KeyDown, new Listener()
{
public void handleEvent(Event e)
{
if ((e.stateMask == SWT.CTRL) && (e.keyCode == SWT.CR))
{
//实现功能的代码部分
}
}
});;
//全局快捷键
display.addFilter(SWT.KeyDown, new Listener()
{
public void handleEvent(Event e)
{
if (e.keyCode == SWT.F5)
{
shell.close();
}
}
});;
//全局快捷键止