Skip to content

Commit

Permalink
Merge pull request #67 from lachlankrautz/feature/emacs-style-up-down
Browse files Browse the repository at this point in the history
Add emacs style up/down shortcuts ctrl+n and ctrl+p
  • Loading branch information
AydinHassan authored Dec 11, 2017
2 parents 7099721 + 1c50927 commit 539f817
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Terminal/UnixTerminal.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ public function getKeyedInput()
$map = [
"\033[A" => 'up',
"k" => 'up',
"" => 'up', // emacs ^P
"\033[B" => 'down',
"j" => 'down',
"" => 'down', //emacs ^N
"\n" => 'enter',
"\r" => 'enter',
" " => 'enter',
Expand Down

0 comments on commit 539f817

Please sign in to comment.