2012-09-27 83 views

回答

3

我找到了辦法(感謝傢伙在IRC)

// ITextEditor editor; 
((StyledText)editor.getAdapter(org.eclipse.swt.widgets.Control.class)).addKeyListener(new KeyListener() { 

    @Override 
    public void keyReleased(KeyEvent e) { 
     System.out.println("key released"); 
    } 

    @Override 
    public void keyPressed(KeyEvent e) { 
     System.out.println("key pressed "); 
    } 
}); 
相關問題