Skip to content

Commit

Permalink
Add Meta+arrow-keys in extended entries of terminfo
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed May 19, 2021
1 parent 4a3e308 commit af6f6ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/reline/ansi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def self.set_default_key_bindings(config)
# extended entries of terminfo
[27, 91, 49, 59, 53, 67] => :em_next_word, # Ctrl+→, extended entry
[27, 91, 49, 59, 53, 68] => :ed_prev_word, # Ctrl+←, extended entry
[27, 91, 49, 59, 51, 67] => :em_next_word, # Meta+→, extended entry
[27, 91, 49, 59, 51, 68] => :ed_prev_word, # Meta+←, extended entry
}.each_pair do |key, func|
config.add_default_key_binding_by_keymap(:emacs, key, func)
config.add_default_key_binding_by_keymap(:vi_insert, key, func)
Expand Down

0 comments on commit af6f6ed

Please sign in to comment.