Keylogging in Ruby

Keylogging in Ruby

I’ve been attempting (feebly) to build a nice Telnet server recently.
One of my (many) difficult tasks is
retrieving characters from the other side of the 'net with the client
hitting enter.

ie…

prompt> look Gr_
prompt> look GrGrog taunts you a second time!_

I’m trying to use keylogging to prevent this from happening. Several
things I have tried…

  1. Using raw mode on the client’s side, and then initiating telnet
    with repeated IO.getc()s.
  2. Using HighLine creatively…
    IO.ask("prompt> ") {|q| word << q}

Neither of those solved any of my problems, though I was sure the
HighLine one would’ve worked.

So does anyone have any ideas or suggestions of what might work?

Thanks,
~ Ari
English is like a pseudo-random number generator - there are a
bajillion rules to it, but nobody cares.