Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
894d067990 | ||
|
|
eeca95b68a | ||
|
|
1964e52cd9 |
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "xterm",
|
"name": "xterm",
|
||||||
"description": "Full xterm terminal, in your browser",
|
"description": "Full xterm terminal, in your browser",
|
||||||
"version": "3.10.0",
|
"version": "3.10.1",
|
||||||
"main": "lib/public/Terminal.js",
|
"main": "lib/public/Terminal.js",
|
||||||
"types": "typings/xterm.d.ts",
|
"types": "typings/xterm.d.ts",
|
||||||
"repository": "https://github.com/xtermjs/xterm.js",
|
"repository": "https://github.com/xtermjs/xterm.js",
|
||||||
|
|||||||
+1
-22
@@ -25,26 +25,6 @@ const GLEVEL: {[key: string]: number} = {'(': 0, ')': 1, '*': 2, '+': 3, '-': 1,
|
|||||||
* DCS subparser implementations
|
* DCS subparser implementations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* DCS + q Pt ST (xterm)
|
|
||||||
* Request Terminfo String
|
|
||||||
* not supported
|
|
||||||
*/
|
|
||||||
class RequestTerminfo implements IDcsHandler {
|
|
||||||
private _data: string;
|
|
||||||
constructor(private _terminal: any) { }
|
|
||||||
hook(collect: string, params: number[], flag: number): void {
|
|
||||||
this._data = '';
|
|
||||||
}
|
|
||||||
put(data: string, start: number, end: number): void {
|
|
||||||
this._data += data.substring(start, end);
|
|
||||||
}
|
|
||||||
unhook(): void {
|
|
||||||
// invalid: DCS 0 + r Pt ST
|
|
||||||
this._terminal.handler(`${C0.ESC}P0+r${this._data}${C0.ESC}\\`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DCS $ q Pt ST
|
* DCS $ q Pt ST
|
||||||
* DECRQSS (https://vt100.net/docs/vt510-rm/DECRQSS.html)
|
* DECRQSS (https://vt100.net/docs/vt510-rm/DECRQSS.html)
|
||||||
@@ -87,7 +67,7 @@ class DECRQSS implements IDcsHandler {
|
|||||||
default:
|
default:
|
||||||
// invalid: DCS 0 $ r Pt ST (xterm)
|
// invalid: DCS 0 $ r Pt ST (xterm)
|
||||||
this._terminal.error('Unknown DCS $q %s', this._data);
|
this._terminal.error('Unknown DCS $q %s', this._data);
|
||||||
this._terminal.handler(`${C0.ESC}P0$r${this._data}${C0.ESC}\\`);
|
this._terminal.handler(`${C0.ESC}P0$r${C0.ESC}\\`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -288,7 +268,6 @@ export class InputHandler extends Disposable implements IInputHandler {
|
|||||||
* DCS handler
|
* DCS handler
|
||||||
*/
|
*/
|
||||||
this._parser.setDcsHandler('$q', new DECRQSS(this._terminal));
|
this._parser.setDcsHandler('$q', new DECRQSS(this._terminal));
|
||||||
this._parser.setDcsHandler('+q', new RequestTerminfo(this._terminal));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispose(): void {
|
public dispose(): void {
|
||||||
|
|||||||
@@ -349,9 +349,8 @@ export function evaluateKeyboardEvent(
|
|||||||
if (ev.keyCode === 65) { // cmd + a
|
if (ev.keyCode === 65) { // cmd + a
|
||||||
result.type = KeyboardResultType.SELECT_ALL;
|
result.type = KeyboardResultType.SELECT_ALL;
|
||||||
}
|
}
|
||||||
} else if (ev.key && !ev.ctrlKey && !ev.altKey && !ev.metaKey &&
|
} else if (ev.key && !ev.ctrlKey && !ev.altKey && !ev.metaKey && ev.keyCode >= 48 && ev.key.length === 1) {
|
||||||
ev.keyCode >= 48 && ev.keyCode !== 144 && ev.keyCode !== 145) {
|
// Include only keys that that result in a _single_ character; don't include num lock, volume up, etc.
|
||||||
// Include only keys that that result in a character; don't include num lock and scroll lock
|
|
||||||
result.key = ev.key;
|
result.key = ev.key;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user