From 3b15511a064b0c602bee1c9be737a162c2dd5c03 Mon Sep 17 00:00:00 2001 From: Jess Archer Date: Fri, 15 Sep 2023 21:54:15 +1000 Subject: [PATCH] Document `CTRL_` constants --- src/Key.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Key.php b/src/Key.php index af8aad53..7869fa5e 100644 --- a/src/Key.php +++ b/src/Key.php @@ -36,19 +36,43 @@ class Key const END = "\e[4~"; + /** + * Cancel/SIGINT + */ const CTRL_C = "\x03"; + /** + * Previous/Up + */ const CTRL_P = "\x10"; + /** + * Next/Down + */ const CTRL_N = "\x0E"; + /** + * Forward/Right + */ const CTRL_F = "\x06"; + /** + * Back/Left + */ const CTRL_B = "\x02"; + /** + * Backspace + */ const CTRL_H = "\x08"; + /** + * Home + */ const CTRL_A = "\x01"; + /** + * End + */ const CTRL_E = "\x05"; }