Fix keychar (modified from speedy keychar)