Skip to content

Commit b3cdb18

Browse files
authored
Add ESC to default controls
1 parent 5533b17 commit b3cdb18

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/InputCharacter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class InputCharacter
2626
public const CTRLW = 'CTRLW';
2727
public const ENTER = 'ENTER';
2828
public const TAB = 'TAB';
29+
public const ESC = 'ESC';
2930

3031
private static $controls = [
3132
"\033[A" => self::UP,
@@ -41,6 +42,7 @@ class InputCharacter
4142
"\027" => self::CTRLW,
4243
"\n" => self::ENTER,
4344
"\t" => self::TAB,
45+
"\e" => self::ESC,
4446
];
4547

4648
public function __construct(string $data)

0 commit comments

Comments
 (0)