Version 7 of How Expect sees function keys

Updated 2002-08-08 21:32:01

Run this:

    puts "Type any characters, then <Return>."

    expect {
        ? {
            set result $expect_out(0,string)
            if [string compare \n $result] {
                scan $result %c value
                puts "You just typed '$result' (decimal ASCII $value)."
            }
            exp_continue
        }
    }

Example output: type "a<CR>", see decimal 97; type "<F1><CR>", see the sequence

27-91-49-(49,50)-126 [explain] Win 95