Я создал веб-инструмент, основанный на Xterm js и Websocket. Все выглядит нормально, кроме символов, перекрывающихся в vi, например:
Мой код xterm для открытия терминала:
function openTerminal() {
var client = new WSSHClient();
var term = new Terminal({cols: 70, rows: 30, screenKeys: true, useStyle: true});
term.on('data', function (data) {
client.sendClientData(data);
});
term.open();
$('.terminal').detach().appendTo('#term');
$("#term").show();
term.write('Connecting...\r\n');
client.connect({
onError: function (error) {
term.write('Error: ' + error + '\r\n');
console.debug('error happened');
},
onConnect: function () {
console.debug('connection established');
},
onClose: function () {
term.write("\rconnection closed")
console.debug('connection reset by peer');
$('term').hide()
},
onData: function (data) {
term.write(data);
console.debug('get data:' + data);
}
})
}