Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/InputCharacter.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class InputCharacter
public const CTRLW = 'CTRLW';
public const ENTER = 'ENTER';
public const TAB = 'TAB';
public const ESC = 'ESC';

private static $controls = [
"\033[A" => self::UP,
Expand All @@ -41,6 +42,7 @@ class InputCharacter
"\027" => self::CTRLW,
"\n" => self::ENTER,
"\t" => self::TAB,
"\e" => self::ESC,
];

public function __construct(string $data)
Expand Down
1 change: 1 addition & 0 deletions test/InputCharacterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function testGetControls() : void
'CTRLW',
'ENTER',
'TAB',
'ESC',
],
InputCharacter::getControls()
);
Expand Down