Description of the new feature:
Currently you cannot add your own keyboard listeners, since the events for keys
are captured on a focus panel hidden inside the InteractiveWidget class.
Allowing users to add keyboard listeners will enable things like copy/paste.
Use Case:
* developer registers key listeners on calendar
* user selects an appointment
* user presses ctrl-c
* developers code copies selected appointment to a temporary variable
* user presses ctrl-v
* developers code clones the appointment and adds it to the calender
* user moves event to any other location by DnD
Code / psuedo-code:
add these lines to InteractiveWidget:
public void addKeyDownHandler(KeyDownHandler handler) {
focusPanel.addKeyDownHandler(handler);
}
public void addKeyUpHandler(KeyUpHandler handler) {
focusPanel.addKeyUpHandler(handler);
}
public void addKeyPressHandler(KeyPressHandler handler) {
focusPanel.addKeyPressHandler(handler);
}
Original issue reported on code.google.com by thomas.d...@gmail.com on 6 Oct 2011 at 8:32
Original issue reported on code.google.com by
thomas.d...@gmail.com
on 6 Oct 2011 at 8:32