lib/ruco/keyboard.rb in ruco-0.0.28 vs lib/ruco/keyboard.rb in ruco-0.0.29

- old
+ new

@@ -138,17 +138,21 @@ end end end def self.escape_sequence?(sequence) - sequence[0..1] == [27, 91] # Esc [ + sequence[0] == 27 # Esc end def self.escape_sequence_to_key(sequence) case sequence when [27, 91, 49, 59, 50, 65] then :"Shift+up" when [27, 91, 49, 59, 50, 66] then :"Shift+down" else - bytes_to_string(sequence) + if sequence.size == 2 + :"Alt+#{sequence[1].chr}" + else + bytes_to_string(sequence) + end end end end \ No newline at end of file