`cat key.log | grep "press" | tr -d "key press   " > keys`
file = File.new("keys","r")
key = ""
while (line = file.gets)
	case line.chomp 
	when "8"
		key = key + " "
	when "10"
		key = key + "1"
	when "11"
    key = key + "2"
  when "12"
    key = key + "3"
  when "13"
    key = key + "4"
  when "14"
    key = key + "5"
  when "15"
    key = key + "6"
  when "16"
    key = key + "7"
  when "17"
    key = key + "8"
  when "18"
    key = key + "9"
  when "19"
    key = key + "0"
  when "20"
    key = key + "-"
  when "21"
    key = key + "="
  when "22"
    key = key + "BackSpace"
  when "23"
    key = key + "Tab"
  when "24"
    key = key + "q"
  when "25"
    key = key + "w"
  when "26"
    key = key + "e"
  when "27"
    key = key + "r"
  when "28"
    key = key + "t"
  when "29"
    key = key + "y"
  when "30"
    key = key + "u"
  when "31"
    key = key + "i"
  when "32"
    key = key + "o"
  when "33"
    key = key + "p"
  when "34"
    key = key + "bracketleft"
  when "35"
    key = key + "bracketright"
  when "36"
    key = key + "Return"
  when "37"
    key = key + "Left Ctrl"
  when "38"
    key = key + "a"
  when "39"
    key = key + "s"
  when "40"
    key = key + "d"
  when "41"
    key = key + "f"
  when "42"
    key = key + "g"
  when "43"
    key = key + "h"
  when "44"
    key = key + "j"
  when "45"
    key = key + "k"
  when "46"
    key = key + "l"
  when "47"
    key = key + ";"
  when "48"
    key = key + "singlequote"
  when "49"
    key = key + "tilde"
  when "50"
    key = key + "Left Shift"
  when "51"
    key = key + "Backslash"
  when "52"
    key = key + "z"
  when "53"
    key = key + "x"
  when "54"
    key = key + "c"
  when "55"
    key = key + "v"
  when "56"
    key = key + "b"
  when "57"
    key = key + "n"
  when "58"
    key = key + "m"
  when "59"
    key = key + ","
  when "60"
    key = key + "."
  when "61"
    key = key + "forwardslash"
  when "62"
    key = key + "Right Shift"
  when "64"
    key = key + "Left Alt"
  when "65"
    key = key + "space"
  when "66"
    key = key + "Caps Lock"
  when "119"
    key = key + "Delete"
  when "105"
    key = key + "Right Ctrl"
  when "108"
    key = key + "Right Alt"
  when "60"
    key = key + "."
 	end
#break
end
print key
