Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add <Home>, <End> and <Delete> key support #2

Merged
merged 1 commit into from

2 participants

@ConradIrwin

I have two terminals on which the definitions for home and end differ; I hope that supporting both gives support for a wide-range of people.

@Mon-Ouie
Owner

Looks good to me. I'd also assume including multiple definitions isn't a problem, unless terminals have conflicting definitions of different keys.

@Mon-Ouie Mon-Ouie merged commit 83ce67e into Mon-Ouie:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 14, 2012
  1. @ConradIrwin
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/coolline/coolline.rb
View
5 lib/coolline/coolline.rb
@@ -46,10 +46,15 @@ class Coolline
Handler.new("\ef", &:forward_word),
Handler.new("\e[A", &:previous_history_line),
Handler.new("\e[B", &:next_history_line),
+ Handler.new("\e[3~", &:kill_current_char),
Handler.new("\e[5~", &:previous_history_line),
Handler.new("\e[6~", &:next_history_line),
+ Handler.new("\e[7~", &:beginning_of_line),
+ Handler.new("\e[8~", &:end_of_line),
Handler.new("\e[C", &:forward_char),
Handler.new("\e[D", &:backward_char),
+ Handler.new("\e[F", &:end_of_line),
+ Handler.new("\e[H", &:beginning_of_line),
Handler.new("\et", &:transpose_words),
Handler.new("\ec", &:capitalize_word),
Handler.new("\eu", &:uppercase_word),
Something went wrong with that request. Please try again.