Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2010, 2011 SAP AG All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors: Lazar Kirchev, SAP AG - initial API and implementation /
package org.eclipse.equinox.console.common.terminal;
This is the base class for all supported terminal types. It contains the escape sequences, common for all mappings.
public abstract class TerminalTypeMappings {
	protected Map<StringKEYSescapesToKey;
	protected String[] escapes;
	protected byte BACKSPACE;
	protected byte DEL;
        .put("[A".); //$NON-NLS-1$
        .put("[B".); //$NON-NLS-1$
        .put("[C".); //$NON-NLS-1$
        .put("[D".); //$NON-NLS-1$
        .put("[G".); //$NON-NLS-1$
	public Map<StringKEYSgetEscapesToKey() {
		return ;
	public String[] getEscapes() {
        if ( != null) {
        	String[] copy = new String[.];
        	System.arraycopy(, 0, copy, 0, .);
        	return copy;
        } else {
            return null;
	public byte getBackspace() {
		return ;
	public byte getDel() {
		return ;
	public abstract void setKeypadMappings();
	private void createEscapes() {
        Object[] temp = .keySet().toArray();
        for (int i = 0; i < .i++) {
            [i] = (Stringtemp[i];
New to GrepCode? Check out our FAQ X