Skip to content

Commit 1c50927

Browse files
committed
Add emacs style up/down shortcuts ctrl+n and ctrl+p
1 parent 870340f commit 1c50927

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Terminal/UnixTerminal.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ public function getKeyedInput()
158158
$map = [
159159
"\033[A" => 'up',
160160
"k" => 'up',
161+
"" => 'up', // emacs ^P
161162
"\033[B" => 'down',
162163
"j" => 'down',
164+
"" => 'down', //emacs ^N
163165
"\n" => 'enter',
164166
"\r" => 'enter',
165167
" " => 'enter',

0 commit comments

Comments
 (0)