Menu

#15 Reset code template insert trigger fail

open
5
2011-06-03
2011-06-03
Huiyao Wu
No

I modify the example "Code Templates Example"(http://fifesoft.com/rsyntaxtextarea/examples/example2.php) to support the customized insert code template keystroke. I did this like the following code, but it didn't take any effect, "CTRL+SHIFT+SPACE" keystroke is still availabel.

CodeTemplateManager ctm = RSyntaxTextArea.getCodeTemplateManager();

//Replace the default keystroke "CTRL+SHIFIT_SPACE" with "ALT + SLASH"
ctm.setInsertTrigger(KeyStroke.getKeyStroke(KeyEvent.VK_SLASH,
InputEvent.ALT_DOWN_MASK));

Discussion