View Javadoc
1   package org.vaadin.aceeditor.client.gwt;
2   
3   import com.google.gwt.core.client.JavaScriptObject;
4   
5   /**
6    * Handles key presses.
7    * 
8    */
9   public interface GwtAceKeyboardHandler {
10  	/**
11  	 * A command returned by
12  	 * {@link GwtAceKeyboardHandler#handleKeyboard(JavaScriptObject, int, String, int, JavaScriptObject)}
13  	 * .
14  	 * 
15  	 */
16  	public enum Command {
17  		/**
18  		 * Let the editor handle the key press like it normally would.
19  		 */
20  		DEFAULT,
21  		/**
22  		 * Prevent the editor from handling the key press.
23  		 */
24  		NULL
25  	}
26  
27  	/**
28  	 * Called on key press.
29  	 * 
30  	 * @param data
31  	 * @param hashId
32  	 * @param keyString
33  	 * @param keyCode
34  	 * @param e
35  	 * @return command
36  	 */
37  	public Command handleKeyboard(JavaScriptObject data, int hashId,
38  			String keyString, int keyCode, GwtAceKeyboardEvent e);
39  }