2020-01-27 15:11:20 -05:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Aviat\Kilo\Enum;
|
|
|
|
|
|
|
|
use Aviat\Kilo\Traits;
|
|
|
|
|
2020-02-05 14:50:31 -05:00
|
|
|
/**
|
|
|
|
* 'Raw' input from stdin
|
|
|
|
*/
|
2020-01-27 15:11:20 -05:00
|
|
|
class KeyCode {
|
|
|
|
use Traits\ConstList;
|
|
|
|
|
|
|
|
public const ARROW_DOWN = "\e[B";
|
|
|
|
public const ARROW_LEFT = "\e[D";
|
|
|
|
public const ARROW_RIGHT = "\e[C";
|
|
|
|
public const ARROW_UP = "\e[A";
|
|
|
|
public const BACKSPACE = "\x7f";
|
2020-02-05 14:50:31 -05:00
|
|
|
public const CARRIAGE_RETURN = "\r";
|
2020-01-27 15:11:20 -05:00
|
|
|
public const DEL_KEY = "\e[3~";
|
2020-02-05 14:50:31 -05:00
|
|
|
public const EMPTY = '';
|
2020-01-27 15:11:20 -05:00
|
|
|
public const ENTER = "\r";
|
|
|
|
public const ESCAPE = "\e";
|
2020-02-05 14:50:31 -05:00
|
|
|
public const FORM_FEED = "\f";
|
|
|
|
public const NEWLINE = "\n";
|
|
|
|
public const NULL = "\0";
|
2020-01-27 15:11:20 -05:00
|
|
|
public const PAGE_DOWN = "\e[6~";
|
|
|
|
public const PAGE_UP = "\e[5~";
|
2020-02-05 14:50:31 -05:00
|
|
|
public const SPACE = ' ';
|
|
|
|
public const TAB = "\t";
|
|
|
|
public const VERTICAL_TAB = "\v";
|
2020-01-27 15:11:20 -05:00
|
|
|
}
|