Add support for c-Left/c-Right

This commit is contained in:
noccy committed 2024-10-03 18:26:36 +02:00
1 parent ab399f77e9
commit e70839ee30
2 files changed
+17

No files matched your search

+6
View File
@@ -112,9 +112,15 @@ class Terminal
} elseif (strncmp($this->inputBuffer, "\e[C", 3) === 0) {
$this->inputBuffer = mb_substr($this->inputBuffer, 3);
return "k{RIGHT}";
} elseif (strncmp($this->inputBuffer, "\e[1;5C", 6) === 0) {
$this->inputBuffer = mb_substr($this->inputBuffer, 6);
return "k{CRIGHT}";
} elseif (strncmp($this->inputBuffer, "\e[D", 3) === 0) {
$this->inputBuffer = mb_substr($this->inputBuffer, 3);
return "k{LEFT}";
} elseif (strncmp($this->inputBuffer, "\e[1;5D", 6) === 0) {
$this->inputBuffer = mb_substr($this->inputBuffer, 6);
return "k{CLEFT}";
} elseif (strncmp($this->inputBuffer, "\e[H", 3) === 0) {
$this->inputBuffer = mb_substr($this->inputBuffer, 3);
return "k{HOME}";