@@ -1358,18 +1358,6 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
|||||||
this.write(data + '\r\n');
|
this.write(data + '\r\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* DEPRECATED: only for backward compatibility. Please use attachCustomKeyEventHandler() instead.
|
|
||||||
* @param {function} customKeydownHandler The custom KeyboardEvent handler to attach. This is a
|
|
||||||
* function that takes a KeyboardEvent, allowing consumers to stop propogation and/or prevent
|
|
||||||
* the default action. The function returns whether the event should be processed by xterm.js.
|
|
||||||
*/
|
|
||||||
public attachCustomKeydownHandler(customKeydownHandler: CustomKeyEventHandler): void {
|
|
||||||
const message = 'attachCustomKeydownHandler() is DEPRECATED and will be removed soon. Please use attachCustomKeyEventHandler() instead.';
|
|
||||||
console.warn(message);
|
|
||||||
this.attachCustomKeyEventHandler(customKeydownHandler);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attaches a custom key event handler which is run before keys are processed, giving consumers of
|
* Attaches a custom key event handler which is run before keys are processed, giving consumers of
|
||||||
* xterm.js ultimate control as to what keys should be processed by the terminal and what keys
|
* xterm.js ultimate control as to what keys should be processed by the terminal and what keys
|
||||||
|
|||||||
+1
-1
@@ -239,7 +239,7 @@ describe('xterm.js', function() {
|
|||||||
xterm.writeln('test');
|
xterm.writeln('test');
|
||||||
}
|
}
|
||||||
var startYDisp = (xterm.rows * 2) + 1;
|
var startYDisp = (xterm.rows * 2) + 1;
|
||||||
xterm.attachCustomKeydownHandler(function () {
|
xterm.attachCustomKeyEventHandler(function () {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user