lib/ruco/keyboard.rb in ruco-0.1.6 vs lib/ruco/keyboard.rb in ruco-0.1.7

- old
+ new

@@ -1,9 +1,8 @@ require 'curses' class Keyboard - SWAP_DELETE = (ENV['TERM'] == 'xterm-color') MAX_CHAR = 255 ENTER = 13 ESCAPE = 27 IS_18 = RUBY_VERSION =~ /^1\.8/ SEQUENCE_TIMEOUT = 0.02 @@ -79,11 +78,11 @@ # modify when 9 then :tab when 353 then :"Shift+tab" when ENTER then :enter # shadows Ctrl+m - when 263, (SWAP_DELETE ? Curses::KEY_DC : 127) then :backspace - when '^[3~', (SWAP_DELETE ? 127 : Curses::KEY_DC) then :delete + when 263, 127 then :backspace + when '^[3~', Curses::KEY_DC then :delete # misc when 0 then :"Ctrl+space" when 1..26 then :"Ctrl+#{A_TO_Z[key-1]}" when ESCAPE then :escape