You may want to google about this, but I seem to remember that to read extended keys, it's a combination of chr 27(esc) + the other key in the keyboard buffer. That's my recollection of how you used to read them in DOS back in my old Pascal programming days. I would assume that you would need to send them the same way.
Hope that helps!
Useless trivia: In the 2004 Las Vegas phone book there are approximately 28 pages of ads for massage, but almost 200 for lawyers.