case SWT.LF:
case SWT.CR:
// "insert"
keyCode = new KeyboardData(e.character, e.stateMask,
(IHTMLGraphicalViewer) getCurrentViewer());
command = new InsertCommand(
PageDesignerResources.getInstance().getString(
"RangeSelectionTool.CommandLabel.Insert"), (IHTMLGraphicalViewer) this.getCurrentViewer(), keyCode); //$NON-NLS-1$
e.doit = false;
break;
default:
if (e.keyCode == 'a' && (e.stateMask & SWT.CTRL) != 0) {
command = new SelectAllCommand("selectAll", //$NON-NLS-1$
(IHTMLGraphicalViewer) this.getCurrentViewer());
e.doit = false;
} else {
if (getCurrentViewer() instanceof IHTMLGraphicalViewer
&& ((IHTMLGraphicalViewer) getCurrentViewer())
.isInRangeMode()
&& (!Character.isIdentifierIgnorable(e.character) && !Character
.isISOControl(e.character))
|| (e.character == '\r')) {
keyCode = new KeyboardData(e.character, e.stateMask,
(IHTMLGraphicalViewer) getCurrentViewer());
// "insert"
command = new InsertCommand(
PageDesignerResources.getInstance().getString(
"RangeSelectionTool.CommandLabel.Insert"), (IHTMLGraphicalViewer) this.getCurrentViewer(), keyCode); //$NON-NLS-1$
e.doit = false;
break;
}