Is there anyway to convert keycodes into their equivelents such as "end"

Right now I just use a function like this:

pub function x(y as z)
select case y
case "a case for all special ones"
case else
x = chr(y)
end select
end function

But I was just wondering if there was a quicker, more efficient way of doing this.