I found how to do, I needed to install the shortcut on the component inside the jscrollpane and not the jscrollpane itself. It only works with an inputMap though, not with a keyListener
It works this way :
Code:
JScrollPane jScrollPane = (JScrollPane) iceController.getDocumentViewController().getViewContainer();
JComponent vue = (JComponent) jScrollPane.getViewport().getComponent(0);
String printKey = "imprimer";
KeyStroke raccourciImprimer = KeyStroke.getKeyStroke('P',
InputEvent.CTRL_DOWN_MASK);
InputMap inputMap = vue.getInputMap(JPanel.WHEN_IN_FOCUSED_WINDOW);
inputMap.put(raccourciImprimer, printKey);
ActionMap actionMap = vue.getActionMap();
actionMap.put(printKey, new AbstractAction() {
public void actionPerformed(ActionEvent e) {
//do what you want
}
});