summaryrefslogtreecommitdiff
path: root/lib/reline.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-06-01 00:02:35 +0900
committeraycabta <aycabta@gmail.com>2019-06-01 00:02:35 +0900
commit88770c2ab668cd01cac016fcf81cb2c8f265ab18 (patch)
treef1a7179ce4a244d64c7c969d8ab37570d3da6cf6 /lib/reline.rb
parent21a43489b18d2ceb04182e0d36bb906439a86610 (diff)
Support Home and End key to move to beg and end
Diffstat (limited to 'lib/reline.rb')
-rw-r--r--lib/reline.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/reline.rb b/lib/reline.rb
index 55e5c5ee61..2f5a155636 100644
--- a/lib/reline.rb
+++ b/lib/reline.rb
@@ -333,7 +333,9 @@ module Reline
[224, 80] => :ed_next_history, # ↓
[224, 77] => :ed_next_char, # →
[224, 75] => :ed_prev_char, # ←
- [224, 83] => :key_delete # Del
+ [224, 83] => :key_delete, # Del
+ [224, 71] => :ed_move_to_beg, # Home
+ [224, 79] => :ed_move_to_end # End
}
}
else
@@ -343,7 +345,9 @@ module Reline
[27, 91, 66] => :ed_next_history, # ↓
[27, 91, 67] => :ed_next_char, # →
[27, 91, 68] => :ed_prev_char, # ←
- [27, 91, 51, 126] => :key_delete # Del
+ [27, 91, 51, 126] => :key_delete, # Del
+ [27, 91, 49, 126] => :ed_move_to_beg,# Home
+ [27, 91, 52, 126] => :ed_move_to_end # End
}
}
end