def save_tty_chars()
@_rl_last_tty_chars = @_rl_tty_chars
h = {}
retry_if_interrupted do
h = Hash[*`stty -a`.scan(/(\w+) = ([^;]+);/).flatten]
end
h.each {|k,v| v.gsub!(/\^(.)/){($1[0].ord ^ ((?a..?z).include?($1[0]) ? 0x60 : 0x40)).chr}}
@_rl_tty_chars.t_erase = h['erase']
@_rl_tty_chars.t_kill = h['kill']
@_rl_tty_chars.t_intr = h['intr']
@_rl_tty_chars.t_quit = h['quit']
@_rl_tty_chars.t_start = h['start']
@_rl_tty_chars.t_stop = h['stop']
@_rl_tty_chars.t_eof = h['eof']
@_rl_tty_chars.t_eol = "\n"
@_rl_tty_chars.t_eol2 = h['eol2']
@_rl_tty_chars.t_susp = h['susp']
@_rl_tty_chars.t_dsusp = h['dsusp']
@_rl_tty_chars.t_reprint = h['rprnt']
@_rl_tty_chars.t_flush = h['flush']
@_rl_tty_chars.t_werase = h['werase']
@_rl_tty_chars.t_lnext = h['lnext']
@_rl_tty_chars.t_status = -1
retry_if_interrupted do
@otio = `stty -g`
end
end