diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/common/terminal/ANSITerminalTypeMappings.java')
-rwxr-xr-x | bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/common/terminal/ANSITerminalTypeMappings.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/common/terminal/ANSITerminalTypeMappings.java b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/common/terminal/ANSITerminalTypeMappings.java new file mode 100755 index 000000000..0396c27ec --- /dev/null +++ b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/common/terminal/ANSITerminalTypeMappings.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Lazar Kirchev, SAP AG - initial API and implementation + *******************************************************************************/ + +package org.eclipse.equinox.console.common.terminal; + +import org.eclipse.equinox.console.common.KEYS; +import org.eclipse.equinox.console.common.terminal.TerminalTypeMappings; + +public class ANSITerminalTypeMappings extends TerminalTypeMappings { + + public ANSITerminalTypeMappings() { + super(); + BACKSPACE = 8; + DEL = 127; + } + + public void setKeypadMappings() { + escapesToKey.put("[1~", KEYS.HOME); //$NON-NLS-1$ + escapesToKey.put("[4~", KEYS.END); //$NON-NLS-1$ + escapesToKey.put("[5~", KEYS.PGUP); //$NON-NLS-1$ + escapesToKey.put("[6~", KEYS.PGDN); //$NON-NLS-1$ + escapesToKey.put("[2~", KEYS.INS); //$NON-NLS-1$ + escapesToKey.put("[3~", KEYS.DEL); //$NON-NLS-1$ + } +} |