From: "(rkumar) Sentinel" Date: 2009-10-04T16:28:25+09:00 Subject: Re: ruby 1.9: handling meta and control keys (rkumar) Sentinel wrote: > 1.8 used to return an int for say ?\M-a or ?C-a (when user types meta-a > or control-a). > > 1.9 returns a string as "\xE1" instead of 225. > After further searching on : http://blog.grayproductions.net/articles/what_is_a_character_encoding I found this: ?\M-a.getbyte(0) It works, however any suggestions on how i can write this so it works for both 1.8 and 1.9 would be welcome. -- Posted via http://www.ruby-forum.com/.