lib/dispel/keyboard.rb in dispel-0.0.7 vs lib/dispel/keyboard.rb in dispel-0.0.8
- old
+ new
@@ -131,10 +131,10 @@
when 0 then :"Ctrl+space"
when 1..26 then :"Ctrl+#{A_TO_Z[key-1]}"
when ESCAPE then :escape
when Curses::KEY_RESIZE then :resize
else
- if key.is_a? Fixnum
+ if key.is_a? Integer
key > MAX_CHAR ? key : key.chr
elsif is_alt_key_code?(key)
:"Alt+#{key.slice(1,1)}"
else
key