We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5533b17 + 2c27f12 commit 2a0e498Copy full SHA for 2a0e498
src/InputCharacter.php
@@ -26,6 +26,7 @@ class InputCharacter
26
public const CTRLW = 'CTRLW';
27
public const ENTER = 'ENTER';
28
public const TAB = 'TAB';
29
+ public const ESC = 'ESC';
30
31
private static $controls = [
32
"\033[A" => self::UP,
@@ -41,6 +42,7 @@ class InputCharacter
41
42
"\027" => self::CTRLW,
43
"\n" => self::ENTER,
44
"\t" => self::TAB,
45
+ "\e" => self::ESC,
46
];
47
48
public function __construct(string $data)
test/InputCharacterTest.php
@@ -58,6 +58,7 @@ public function testGetControls() : void
58
'CTRLW',
59
'ENTER',
60
'TAB',
61
+ 'ESC',
62
],
63
InputCharacter::getControls()
64
);
0 commit comments